Advertisement
Guest User

PONG.ASM V4.04

a guest
Dec 30th, 2012
649
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 104.05 KB | None | 0 0
  1. ;---------------------------------------------------;
  2. ;---------------------------------------------------;
  3. ; Name: PONG.ASM ;
  4. ; Use: DTI's version of the PONG game ;
  5. ;---------------------------------------------------;
  6. ; Copyright: (C)2012 DTI ;
  7. ; Dysfunctional Technologies, Inc. ;
  8. ; All Rights Reserved ;
  9. ;---------------------------------------------------;
  10. ; Author: Timothy S. Carlson ;
  11. ; Dysfunctional Technologies, Inc. ;
  12. ; Date: December 30, 2012 ;
  13. ; Version: V4.04 ;
  14. ;---------------------------------------------------;
  15. ;---------------------------------------------------;
  16. ; WEBSITE: www.dysfunctionaltechnologies.com ;
  17. ; EMAIL: tscarlson@gmail.com ;
  18. ; ;
  19. ; You are welcome to use this code as you see fit, ;
  20. ; however - not to be used in for-profit products ;
  21. ; unless we have come to a monetary agreement. ;
  22. ; ;
  23. ; If this code is used, credit given is appreciated ;
  24. ;---------------------------------------------------;
  25. ;---------------------------------------------------;
  26. ; VERSION LOG: ;
  27. ; V3.00: Modified characters, character placement, ;
  28. ; and field to look more like the real PONG ;
  29. ; V3.01: Renamed to PIC-PONG ;
  30. ; - Added 64x224 mode for copyright message ;
  31. ; - Added piezo speaker for sounds ;
  32. ; - Added ball 'slow-down' method ;
  33. ; - Added special dot as court divider ;
  34. ; V3.02: Fixed my program memory page issues. ;
  35. ; - Revamped _Draw_Scores. Cleaner, faster. ;
  36. ; - Redid title - "PONG FOR THE 12F1840" ;
  37. ; - Added _DEBUG_ turns on/off GP2 VSYNC Pulse;
  38. ; - Moved some procs to high page: ;
  39. ; - _Draw_Title ;
  40. ; - _Clear_Court ;
  41. ; - _Copyright ;
  42. ; - _Initialize_System ;
  43. ; - More comments ;
  44. ; - Modified comments discussing the number of;
  45. ; lines, what they do, and how long (in ms) ;
  46. ; for a complete video frame. ;
  47. ; 260 lines * 64us each = 16.64ms per frame ;
  48. ; The current timing is ~16.645ms per frame ;
  49. ; - General Cleanup ;
  50. ; - Added the software version number at the ;
  51. ; bottom right of the screen, in the copy- ;
  52. ; right strip. ;
  53. ; V3.03: Updated version number display to V3.03 ;
  54. ; - Adding more comments ;
  55. ; - Changed references to 'Half_Line' and ;
  56. ; 'Full_Line' in some proc titles to ;
  57. ; '30us_Line' and '60us_Line' respectively. ;
  58. ; (_Blank_Half_Line => _Blank_30us_Line) ;
  59. ; - Moved some line generation procs to high ;
  60. ; page, added PAGESELs, adjusted timings. ;
  61. ; - _Blank_60us_Line ;
  62. ; - _Blank_30us_Line ;
  63. ; - _Special_30us_Line ;
  64. ; - _Inverted_30us_Line ;
  65. ; - Everything possible has been moved to the ;
  66. ; high page of memory, with the exceptions: ;
  67. ; - _Update_Paddle_1 ;
  68. ; - _Update_Paddle_2 ;
  69. ; - _Update_Ball ;
  70. ; I am only using 655 words in the low page ;
  71. ; of program memory now (H'000'-H'28E') out ;
  72. ; of 4096 bytes (2048 words). The high page ;
  73. ; is packed - H'800'-H'D92'. I left the ;
  74. ; above procs in the low page as I will be ;
  75. ; making modifications / enhancements to ;
  76. ; these routines in the near future. ;
  77. ; - NOTE: If you see what appears to be stray ;
  78. ; NOPs strewn about in the code - DON'T ;
  79. ; REMOVE THEM. They are there for video ;
  80. ; timings purposes. Remove them and DOOM! ;
  81. ; V3.04: Updated version number display to V3.04 ;
  82. ; - Changed the use of Timer0 (8bit) from ;
  83. ; loading zero and waiting for count to ;
  84. ; loading (inverse) count and waiting for ;
  85. ; overflow flag (TMR0IF) in INTCON. ;
  86. ; - Created _Clear_Items and _Draw_Items. ;
  87. ; _Clear_Items clears ball, paddles, scores ;
  88. ; _Draw_Items draws ball, paddles, scores ;
  89. ; - Removed _Update_Scores, since one half ;
  90. ; went into _Clear_Items and the other half ;
  91. ; went into _Draw_Items. There was nothing ;
  92. ; left, except for 60us line generation, ;
  93. ; after that. ;
  94. ; V3.05: Updated verion number display to V3.05 ;
  95. ; - Changed field size from 32x56 to 32x48 ;
  96. ; - Changed VIDEO_BUFFER start from H'2010' to;
  97. ; H'2020' to recover 16 bytes of data memory;
  98. ; that are now available due to small field ;
  99. ; - Added dynamic creation of blank lines ;
  100. ; depending on screen size. This will keep ;
  101. ; the screen centered (vertically) in the ;
  102. ; viewable area of the video frame and keep ;
  103. ; the video frame at 60hz ;
  104. ; - Added court sidelines so that the limits ;
  105. ; of the court can be easily determined no ;
  106. ; matter the size of the field. ;
  107. ; - Added 'SERVICE' markers (arrows next to ;
  108. ; the scores) to easily determine who's turn;
  109. ; it is to serve. Last one scored serves. ;
  110. ; - Reduced size of title screen and changed ;
  111. ; title back to just 'PONG'. Title screen ;
  112. ; was too large and the time to draw (or ;
  113. ; clear) was blowing WAY past the 60us limit;
  114. ; - Changed wall collision detection so that ;
  115. ; Ball_Dir_Y can be something other that 1 ;
  116. ; or -1. This opens the door to implementing;
  117. ; 'english' on the ball ;
  118. ; - Service is now done from the paddle, not ;
  119. ; center court. And the beginning Ball_Y ;
  120. ; position is centered with the paddle ;
  121. ; - Ball angle on service (Ball_Dir_Y at 1 or ;
  122. ; for the left paddle, -1 or -2 for the ;
  123. ; right paddle) depends on paddle position ;
  124. ; - The starting position of the scores has ;
  125. ; been dropped one line to keep the score ;
  126. ; display from bumping against the court ;
  127. ; side line. ;
  128. ; - With a field of 32x48, PONG has been ;
  129. ; testing on a Sony PS1 LCD monitor, a small;
  130. ; PHILIPS LCD TV, and a regular CRT TV which;
  131. ; all work well. However, a 32" Chinese made;
  132. ; LCD TV does not work - maybe because it ;
  133. ; wants 50hz? Any feedback on various TVs ;
  134. ; used with PONG would be appreciated. ;
  135. ; - Added a check to see if the left or right ;
  136. ; button is being held - this keeps from ;
  137. ; holding the button down and continuously ;
  138. ; serving the ball. ;
  139. ; - Even MORE comments added. I sure hope I ;
  140. ; remove all of the old (irrelevent) ones. ;
  141. ; - Back to the large graphics to the title. ;
  142. ; I split it into two 60us lines. Also did ;
  143. ; a lot of tricks to reduce the instruction ;
  144. ; count. _Clear_Screen replaces _Clear_Items;
  145. ; and will clear the screen OR display the ;
  146. ; title at the appropriate time. ;
  147. ; - EVERYTHING uses TIMER0 now, except for ;
  148. ; generating a positive 2us sync pulse. Not ;
  149. ; enough cycles to incorporate the timer. ;
  150. ; - All loose code and commented out lines ;
  151. ; removed. All timings at spec. RELEASE! ;
  152. ; V3.06: Updated verion number display to V3.06 ;
  153. ; - Corrected a few bugs in ball/paddle ;
  154. ; collision detection. ;
  155. ; - Corrected a bug in _Clear_Screen ;
  156. ; - Moved all 30us stuff to a procedure called;
  157. ; _Vertical_Sync. ;
  158. ; - Split the code as evenly as I could ;
  159. ; between the low page and high page of ;
  160. ; program memory. Lots of room for editing ;
  161. ; now without worrying about bumping the ;
  162. ; ceilings. There's around 900 program words;
  163. ; free in each page. ;
  164. ; - I don't think there are any major bugs - ;
  165. ; just enhancements waiting in the wings. ;
  166. ; Time to final release and move on! ;
  167. ; V3.07: Updated version number display to V3.07 ;
  168. ; - Added a blank line and then two white ;
  169. ; lines just after the copyright lines. Just;
  170. ; because I like it better. ;
  171. ; - Fixed the 'shoot off in a horitontal angle;
  172. ; when hitting the upper sideline wall' bug.;
  173. ; If you saw the V3.06 demo video, it was ;
  174. ; occurring frequently and the OCD in me ;
  175. ; said "You gotta fix that". ;
  176. ; That's it for this version - RELEASE! ;
  177. ; V4.00: Updated version number display to V4.00 ;
  178. ; - Converting timings of video signal to ;
  179. ; TIMER0 Interrupt Service Routine. ;
  180. ; - Added a 'shake loose' of the PICKIT if ;
  181. ; attached. Without the 'shake loose', the ;
  182. ; PICKIT hold GPIO1 low, which is the RBUTT.;
  183. ; V4.01: Updated version number display to V4.01 ;
  184. ; - Added COMPUTER mode for player 2. Hold ;
  185. ; down the LEFT button when powering up. A ;
  186. ; large 'C' should display in the upper ;
  187. ; right corner. PLAYER 2 is now controlled ;
  188. ; by the computer. ;
  189. ; V4.02: Updated version number display to V4.02 ;
  190. ; V4.03: Updated version number display to V4.03 ;
  191. ; V4.04: Updated version number display to V4.04 ;
  192. ; - Split off the NTSC video generation into ;
  193. ; it's own module ;
  194. ;---------------------------------------------------;
  195. ;---------------------------------------------------;
  196.  
  197. ;---------------------------------------------------;
  198. ; Project Defines ;
  199. ;---------------------------------------------------;
  200. #DEFINE _PONG.ASM_ ;
  201. #DEFINE _MAIN_MODULE_ ;
  202. ;---------------------------------------------------;
  203. #DEFINE _USE_THUMBSTICKS_ TRUE ;
  204. #DEFINE _DISABLE_GAME_PROCESSING_ FALSE ;
  205. ;---------------------------------------------------;
  206.  
  207. ;---------------------------------------------------;
  208. ; Includes ;
  209. ;---------------------------------------------------;
  210. ; This file has some common defines (TRUE, FALSE, ;
  211. ; etc.) used throughout the program. It also has the;
  212. ; CONFIGURATION_BITS settings for the PIC, which are;
  213. ; only processed in the module that has the define ;
  214. ; _MAIN_MODULE_. ;
  215. ;---------------------------------------------------;
  216. #INCLUDE Common.INC ;
  217. #INCLUDE NTSC_Interface.INC ;
  218. ;---------------------------------------------------;
  219.  
  220. ;---------------------------------------------------;
  221. ; Macros ;
  222. ;---------------------------------------------------;
  223. DELAY MACRO DTIME ;
  224. ;-----------------------------------------------;
  225. ; The time munger used EVERYWHERE ;
  226. ;-----------------------------------------------;
  227. MOVLW DTIME ;
  228. MOVWF DTemp ;
  229. DECFSZ DTemp, F ;
  230. GOTO $-1 ;
  231. ;-----------------------------------------------;
  232. ENDM ;
  233. ;
  234. ;---------------------------------------------------;
  235. ; Defines ;
  236. ;---------------------------------------------------;
  237. ; You have to chose between using all buttons, ;
  238. ; or using a thumbstick with a button. I might ;
  239. ; be able to figure out a way to automatically ;
  240. ; determine which is connected, but for now you ;
  241. ; will just have to decide which you want, set ;
  242. ; _USE_THUMBSTICKS_ to either TRUE or FALSE, and;
  243. ; re-compile the project. ;
  244. ;-----------------------------------------------;
  245. #IF _USE_THUMBSTICKS_ ;
  246. #DEFINE RJOY H'01' ; Right THUMBSTICK
  247. #DEFINE RJOY_BIT 0 ; GPIO 0 - PIN 7
  248. #DEFINE RBUTT H'02' ; Right BUTTON when set to INPUT
  249. #DEFINE RBUTT_BIT 1 ; GPIO 1 - PIN 6
  250. #DEFINE LJOY H'04' ; Left THUMBSTICK
  251. #DEFINE LJOY_BIT 2 ; GPIO 2 - PIN 5
  252. #DEFINE LBUTT H'08' ; Left BUTTON
  253. #DEFINE LBUTT_BIT 3 ; GPIO 3 - PIN 4
  254. #ELSE ;!_USE_THUMBSTICKS_ ;
  255. #DEFINE RBUTT_1 H'01' ; Right BUTTON 1
  256. #DEFINE RBUTT_1_BIT 0 ; GPIO 0 - PIN 7
  257. #DEFINE RBUTT_2 H'02' ; Right BUTTON 2
  258. #DEFINE RBUTT_2_BIT 1 ; GPIO 1 - PIN 6
  259. #DEFINE LBUTT_2 H'04' ; Left BUTTON 2
  260. #DEFINE LBUTT_2_BIT 2 ; GPIO 2 - PIN 5
  261. #DEFINE LBUTT_1 H'08' ; Left BUTTON 1
  262. #DEFINE LBUTT_1_BIT 3 ; GPIO 3 - PIN 4
  263. #ENDIF ;_USE_THUMBSTICKS_ ;
  264. ;-----------------------------------------------;
  265. ;
  266. ;-----------------------------------------------;
  267. ; This is my method of making the game easier or;
  268. ; harder - either I update and draw the ball ;
  269. ; every frame (fast ball), or every other frame ;
  270. ; (not as fast), or every 3rd frame (normal ;
  271. ; ball) or higher for slower. Set MAX_BALL_WAIT ;
  272. ; to the desired speed (1=fast, 2=not as fast, ;
  273. ; 3=normal, 4=slower, etc.). This is hardcoded ;
  274. ; right now, a change requires a recompile. I ;
  275. ; have plans to allocate another precious byte ;
  276. ; of data memory so that the ball speed can be ;
  277. ; changed by a menu item. ;
  278. ;-----------------------------------------------;
  279. #DEFINE DRAW_BALL_BIT 0 ;
  280. #DEFINE MAX_BALL_WAIT 3 ;
  281. ;
  282. ;-----------------------------------------------;
  283. ; Just a bunch of hardcoded starting points, ;
  284. ; sizes, and bit-munching stuff for the various ;
  285. ; graphics. ;
  286. ;-----------------------------------------------;
  287. ; I use the PIC's LINEAR MEMORY scheme to create;
  288. ; a contiguous video buffer. Grab the MicroChip ;
  289. ; documentation and read up. Then go search on ;
  290. ; the web for some docs that will really explain;
  291. ; it for you. ;
  292. ;-----------------------------------------------;
  293. #DEFINE FIELD_HEIGHT NUM_LINES ;
  294. #DEFINE FIELD_WIDTH 32 ;
  295. #DEFINE LEFT_SCORE_START H'01' ;
  296. #DEFINE RIGHT_SCORE_START H'02' ;
  297. #DEFINE LEFT_PADDLE_START H'00' ;
  298. #DEFINE LEFT_PADDLE_BIT H'40' ;
  299. #DEFINE LEFT_PADDLE_MASK H'BF' ;
  300. #DEFINE RIGHT_PADDLE_START H'03' ;
  301. #DEFINE RIGHT_PADDLE_BIT H'02' ;
  302. #DEFINE RIGHT_PADDLE_MASK H'FD' ;
  303. #DEFINE PADDLE_HEIGHT 9 ;
  304. #DEFINE BALL_HEIGHT 3 ;
  305. #DEFINE SERVICE_1_START H'00' ;
  306. #DEFINE SERVICE_2_START H'03' ;
  307. ;---------------------------------------------------;
  308.  
  309. ;---------------------------------------------------;
  310. ;---------------------------------------------------;
  311. USER_DATA_1 UDATA H'020' ;
  312. ;---------------------------------------------------;
  313. Temp1 res 1 ; 20
  314. Temp2 res 1 ; 21
  315. Ball_X res 1 ; 22
  316. Ball_Y res 1 ; 23
  317. Ball_Dir_X res 1 ; 24
  318. Ball_Dir_Y res 1 ; 25
  319. Paddle_1_Y res 1 ; 26
  320. Paddle_1_Dir_Y res 1 ; 27
  321. Paddle_2_Y res 1 ; 28
  322. Paddle_2_Dir_Y res 1 ; 29
  323. Score_1 res 1 ; 2A
  324. Score_2 res 1 ; 2B
  325. Ball_Wait res 1 ; 2C
  326. ;---------------------------------------------------;
  327. ; Bit definitions for System_Status ;
  328. ;---------------------------------------------------;
  329. #DEFINE P1_SERVICE H'01' ;
  330. #DEFINE P1_SERVICE_BIT 0 ;
  331. #DEFINE P1_PRESSED H'02' ;
  332. #DEFINE P1_PRESSED_BIT 1 ;
  333. #DEFINE P2_SERVICE H'04' ;
  334. #DEFINE P2_SERVICE_BIT 2 ;
  335. #DEFINE P2_PRESSED H'08' ;
  336. #DEFINE P2_PRESSED_BIT 3 ;
  337. #DEFINE P2_COMPUTER H'10' ;
  338. #DEFINE P2_COMPUTER_BIT 4 ;
  339. #DEFINE BANNER_SELECT H'20' ;
  340. #DEFINE BANNER_SELECT_BIT 5 ;
  341. ;---------------------------------------------------;
  342. System_Status res 1 ; 2D
  343. ;---------------------------------------------------;
  344. ; Banner display definitions and variables ;
  345. ;---------------------------------------------------;
  346. #DEFINE MAX_TBANNERS 5 ;
  347. #DEFINE MAX_BBANNERS 9 ;
  348. TB_Count res 1 ; 2E
  349. BB_Count res 1 ; 2F
  350. DTemp res 1 ; 30
  351. Line_Count res 1 ; 31
  352. Repeat_Count res 1 ; 32
  353. ;---------------------------------------------------;
  354. ; I've pushed the VIDEO_BUFFER to H'2030', since the;
  355. ; field has become smaller (32x48 vs 32x56). The ;
  356. ; required size of the VIDEO_BUFFER is also less, so;
  357. ; this will give up 32 more bytes of data memory for;
  358. ; use in game programming. ;
  359. ;---------------------------------------------------;
  360. ; We don't access the Video_BufferX arrays directly,;
  361. ; we use LINEAR PAGE memory through the FSR register;
  362. ; LINEAR PAGE memory groups the data memory at 0x20,;
  363. ; 0xA0, and Ox120 into a contiguous linear page. ;
  364. ; Note that the shared memory (at the top 16 bytes ;
  365. ; of each page) is NOT included in the LINEAR PAGE ;
  366. ; memory mapping. ;
  367. ;---------------------------------------------------;
  368. ; MEMORY MAP - LINEAR PAGE MEMORY - 240 bytes total ;
  369. ; 0x2000-0x204F - 0x020-0x06F 80 bytes ;
  370. ; 0x2050-0x20BF - 0x0A0-0x0EF 80 bytes ;
  371. ; 0x20A0-0x20EF - 0x120-0x16F 80 bytes ;
  372. ;---------------------------------------------------;
  373. ; Since out max lines (now) is 48, we need 48x8 ;
  374. ; (192) bytes of memory for the screen buffer. This ;
  375. ; leaves us with 48 bytes of data memory for program;
  376. ; variables, plus the 16 in shared memory for 64! ;
  377. ;---------------------------------------------------;
  378. ;---------------------------------------------------;
  379.  
  380. ;---------------------------------------------------;
  381. ;---------------------------------------------------;
  382. ; Reset Vector Code - Entry point from reset ;
  383. ;---------------------------------------------------;
  384. RESET_VECT CODE H'000' ;
  385. ;---------------------------------------------------;
  386. ; Initialize the hardware and memory elements. ;
  387. ; This is a FAR CALL to a proc in the high ;
  388. ; page of Program Memory, so it needs the ;
  389. ; PAGESEL before and after the CALL to properly ;
  390. ; set the upper 2 bits in the program counter. ;
  391. ; I am slowly converting ALL CALLs (and some ;
  392. ; GOTOs) to having PAGESEL before and after, but;
  393. ; the added instruction cycles mess up the video;
  394. ; timings in some spots. To be done slowly and ;
  395. ; surely. ;
  396. ;-----------------------------------------------;
  397. PAGESEL _Initialize_System ;
  398. GOTO _Initialize_System ;
  399. NOP ;
  400. NOP ;
  401. ;---------------------------------------------------;
  402. ;---------------------------------------------------;
  403.  
  404. ;---------------------------------------------------;
  405. ;---------------------------------------------------;
  406. ; User Code in the low page of Program Memory ;
  407. ; More user code (USER_CODE_2) can be found in the ;
  408. ; high page of Program Memory, starting at H'800' ;
  409. ;---------------------------------------------------;
  410. USER_CODE_1 CODE H'00A' ;
  411. ;---------------------------------------------------;
  412.  
  413. ;---------------------------------------------------;
  414. _Initialize_System: ;
  415. ;---;-----------------------------------------------;
  416. ; Initialize Hardware ;
  417. ;-----------------------------------------------;
  418. ; - Oscillator ;
  419. ;-----------------------------------------------;
  420. _IS_Init_Oscillator: ;
  421. BANKSEL OSCCON ;
  422. MOVLW B'11110000' ; 32Mhz
  423. MOVWF OSCCON ;
  424. ;
  425. BANKSEL OSCSTAT ; Wait for
  426. _IS_IO_Wait: ;
  427. MOVFW OSCSTAT ; high speed
  428. ANDLW H'79' ; oscillator
  429. XORLW H'59' ; to be
  430. BTFSS STATUS, Z ; stable and
  431. GOTO _IS_IO_Wait ; locked
  432. ;-----------------------------------------------;
  433. ;
  434. ;-----------------------------------------------;
  435. ; - GPIOs ;
  436. ;-----------------------------------------------;
  437. _IS_Init_GPIOs: ;
  438. BANKSEL ANSELA ;
  439. CLRF ANSELA ; ALL I/O as digital
  440. #IF _USE_THUMBSTICKS_ ;
  441. BSF ANSELA, LJOY_BIT ;
  442. BSF ANSELA, RJOY_BIT ;
  443. #ENDIF ;_USE_THUMBSTICKS_ ;
  444. ;
  445. BANKSEL LATA ;
  446. CLRF LATA ;
  447. ;
  448. BANKSEL TRISA ;
  449. CLRF TRISA ;
  450. #IF _USE_THUMBSTICKS_ ;
  451. BSF TRISA, LJOY_BIT ; Set as INPUT
  452. BSF TRISA, LBUTT_BIT ; Set as INPUT
  453. BSF TRISA, RJOY_BIT ; Set as INPUT
  454. BSF TRISA, RBUTT_BIT ; Set as INPUT
  455. #ELSE ;!_USE_THUMBSTICKS_ ;
  456. BSF TRISA, LBUTT_1_BIT ; Set as INPUT
  457. BSF TRISA, LBUTT_2_BIT ; Set as INPUT
  458. BSF TRISA, RBUTT_1_BIT ; Set as INPUT
  459. BSF TRISA, RBUTT_2_BIT ; Set as INPUT
  460. #ENDIF ;_USE_THUMBSTICKS_ ;
  461. ;
  462. BANKSEL PORTA ;
  463. CLRF PORTA ;
  464. #IF _USE_THUMBSTICKS_ ;
  465. BSF PORTA, LJOY_BIT ; Set HIGH
  466. BSF PORTA, LBUTT_BIT ; Set HIGH
  467. BSF PORTA, RJOY_BIT ; Set HIGH
  468. BSF PORTA, RBUTT_BIT ; Set HIGH
  469. #ELSE ;!_USE_THUMBSTICKS_ ;
  470. BSF PORTA, LBUTT_1_BIT ; Set HIGH
  471. BSF PORTA, LBUTT_2_BIT ; Set HIGH
  472. BSF PORTA, RBUTT_1_BIT ; Set HIGH
  473. BSF PORTA, RBUTT_2_BIT ; Set HIGH
  474. #ENDIF ;_USE_THUMBSTICKS_ ;
  475. ;-----------------------------------------------;
  476. ;
  477. ;-----------------------------------------------;
  478. ; - Miscellaneous ;
  479. ;-----------------------------------------------;
  480. _IS_Init_Misc: ;
  481. BANKSEL INTCON ;
  482. CLRF INTCON ;
  483. ;
  484. BANKSEL OPTION_REG ;
  485. CLRF OPTION_REG ;
  486. ;-----------------------------------------------;
  487. ;
  488. ;-----------------------------------------------;
  489. ; - Memory ;
  490. ;-----------------------------------------------;
  491. _IS_Init_Memory: ;
  492. BANKSEL MEMORY ;
  493. CLRF System_Status ;
  494. BSF System_Status, P1_SERVICE_BIT ;
  495. BSF System_Status, P2_SERVICE_BIT ;
  496. MOVLW MAX_BALL_WAIT ;
  497. MOVWF Ball_Wait ;
  498. MOVLW 0 ;
  499. MOVWF Score_1 ;
  500. MOVLW 0 ;
  501. MOVWF Score_2 ;
  502. MOVLW 20 ;
  503. MOVWF Paddle_1_Y ;
  504. MOVLW 0 ;
  505. MOVWF Paddle_1_Dir_Y ;
  506. MOVLW 20 ;
  507. MOVWF Paddle_2_Y ;
  508. MOVLW 0 ;
  509. MOVWF Paddle_2_Dir_Y ;
  510. MOVLW 15 ;
  511. MOVWF Ball_X ;
  512. MOVLW 27 ;
  513. MOVWF Ball_Y ;
  514. MOVLW 0 ;
  515. MOVWF Ball_Dir_X ;
  516. MOVLW 0 ;
  517. MOVWF Ball_Dir_Y ;
  518. CLRF TB_Count ;
  519. CLRF BB_Count ;
  520. ;-----------------------------------------------;
  521. ;
  522. ;-----------------------------------------------;
  523. ; - Other Subsystems ;
  524. ;-----------------------------------------------;
  525. PAGESEL _NTSC_Initialize_Subsystem ;
  526. CALL _NTSC_Initialize_Subsystem ;
  527. PAGESEL $ ;
  528. ;-----------------------------------------------;
  529. ;
  530. ;-----------------------------------------------;
  531. ; This will 'shake loose' the PICKIT, if ;
  532. ; attached. By 'shake loose', I mean to get the ;
  533. ; the PICKIT3 to release control of the GPIO1 ;
  534. ; line and let it go HIGH. Otherwise, the GPIO1 ;
  535. ; line is held LOW and the system thinks player ;
  536. ; 2 is pressing the button, starting a game. ;
  537. ;-----------------------------------------------;
  538. _IS_Shake_Loose_PICKIT: ;
  539. BANKSEL TRISA ;
  540. BCF TRISA, RBUTT_BIT ;
  541. BANKSEL PORTA ;
  542. BSF PORTA, RBUTT_BIT ;
  543. _IS_SLP_Wait_For_Button: ;
  544. DELAY 255 ;
  545. BANKSEL TRISA ;
  546. BSF TRISA, RBUTT_BIT ;
  547. BANKSEL PORTA ;
  548. BTFSS PORTA, RBUTT_BIT ;
  549. GOTO _IS_SLP_Wait_For_Button ;
  550. BANKSEL TRISA ;
  551. BCF TRISA, RBUTT_BIT ;
  552. BANKSEL PORTA ;
  553. BSF PORTA, RBUTT_BIT ;
  554. ;-----------------------------------------------;
  555. ;
  556. ;-----------------------------------------------;
  557. ; This will see if BUTTON 1 (left player) is ;
  558. ; being pressed at power up. If so, PLAYER 2 ;
  559. ; will be flagged as a COMPUTER PLAYER. ;
  560. ;-----------------------------------------------;
  561. _IS_Check_For_Computer_Option: ;
  562. BTFSC PORTA, LBUTT_BIT ;
  563. GOTO _IS_Exit ;
  564. BSF System_Status, P2_COMPUTER_BIT ;
  565. BSF System_Status, P1_PRESSED_BIT ;
  566. ;-----------------------------------------------;
  567. ;
  568. _IS_Exit: ;
  569. PAGESEL _NTSC_Video ;
  570. GOTO _NTSC_Video ;
  571. ;---------------------------------------------------;
  572.  
  573. ;---------------------------------------------------;
  574. _NTSC_Blank_Line_10: ;
  575. ;---------------------------------------------------;
  576. ; This is a 2 60us line procedure, so comsume an ;
  577. ; additional line without generating a blank line ;
  578. ;---------------------------------------------------;
  579. PAGESEL _Clear_Screen ;
  580. CALL _Clear_Screen ;
  581. PAGESEL $ ;
  582. ;---------------------------------------------------;
  583. _NTSC_Blank_Line_11: ;
  584. ;---------------------------------------------------;
  585. RETURN ;
  586. ;---------------------------------------------------;
  587.  
  588. ;---------------------------------------------------;
  589. _NTSC_Blank_Line_12: ;
  590. ;---------------------------------------------------;
  591. ; This is a 2 60us line procedure, so comsume an ;
  592. ; additional line without generating a blank line ;
  593. ;---------------------------------------------------;
  594. PAGESEL _Update_Paddles ;
  595. CALL _Update_Paddles ;
  596. PAGESEL $ ;
  597. ;---------------------------------------------------;
  598. _NTSC_Blank_Line_13: ;
  599. ;---------------------------------------------------;
  600. RETURN ;
  601. ;---------------------------------------------------;
  602.  
  603. ;---------------------------------------------------;
  604. _NTSC_Blank_Line_14: ;
  605. ;---------------------------------------------------;
  606. PAGESEL _Update_Ball ;
  607. CALL _Update_Ball ;
  608. PAGESEL $ ;
  609. RETURN ;
  610. ;---------------------------------------------------;
  611.  
  612. ;---------------------------------------------------;
  613. _NTSC_Blank_Line_15: ;
  614. ;---------------------------------------------------;
  615. ; This is a 3 60us line procedure, so comsume two ;
  616. ; additional lines without generating a blank line ;
  617. ;---------------------------------------------------;
  618. PAGESEL _Draw_Items ;
  619. CALL _Draw_Items ;
  620. PAGESEL $ ;
  621. ;---------------------------------------------------;
  622. _NTSC_Blank_Line_16: ;
  623. _NTSC_Blank_Line_17: ;
  624. ;---------------------------------------------------;
  625. RETURN ;
  626. ;---------------------------------------------------;
  627.  
  628. ;---------------------------------------------------;
  629. ; This is for displaying the banners at the top and ;
  630. ; bottom of the playing field. ;
  631. ;---------------------------------------------------;
  632. _NTSC_Blank_Line_34: ;
  633. ;---------------------------------------------------;
  634. PAGESEL _Banners ;
  635. BCF System_Status, BANNER_SELECT_BIT ;
  636. CALL _Banners ;
  637. PAGESEL $ ;
  638. RETURN ;
  639. ;---------------------------------------------------;
  640. _NTSC_Blank_Line_241: ;
  641. ;---------------------------------------------------;
  642. PAGESEL _Banners ;
  643. BSF System_Status, BANNER_SELECT_BIT ;
  644. CALL _Banners ;
  645. PAGESEL $ ;
  646. RETURN ;
  647. ;---------------------------------------------------;
  648. ; Eight white lines, 2 each above and below each ;
  649. ; banner. ;
  650. ;---------------------------------------------------;
  651. _NTSC_Blank_Line_31: ;
  652. _NTSC_Blank_Line_32: ;
  653. _NTSC_Blank_Line_42: ;
  654. _NTSC_Blank_Line_43: ;
  655. _NTSC_Blank_Line_238: ;
  656. _NTSC_Blank_Line_239: ;
  657. _NTSC_Blank_Line_249: ;
  658. _NTSC_Blank_Line_250: ;
  659. PAGESEL _WHITE_4us_SYNC_60us_LINE ;
  660. CALL _WHITE_4us_SYNC_60us_LINE ;
  661. PAGESEL $ ;
  662. RETURN ;
  663. ;---------------------------------------------------;
  664. ; Six black lines, 1 each above and below each ;
  665. ; banner as a spacer been the banners and the white ;
  666. ; lines. Also 1 black line AFTER the entire top ;
  667. ; banner and BEFORE the entire bottom banner as ;
  668. ; spacers between the banners and the game field ;
  669. ; Also note that the black line AFTER each banner ;
  670. ; (and before the white lines) consumes all of the ;
  671. ; CALLS/RETURNS to consumed lines. This keeps the ;
  672. ; video timing correct. ;
  673. ;---------------------------------------------------;
  674. _NTSC_Blank_Line_33: ;
  675. _NTSC_Blank_Line_35: ;
  676. _NTSC_Blank_Line_44: ;
  677. _NTSC_Blank_Line_237: ;
  678. _NTSC_Blank_Line_240: ;
  679. _NTSC_Blank_Line_242: ;
  680. PAGESEL _BLACK_4us_SYNC_60us_LINE ;
  681. CALL _BLACK_4us_SYNC_60us_LINE ;
  682. PAGESEL $ ;
  683. RETURN ;
  684. ;---------------------------------------------------;
  685. ; These lines are 'consumed' elsewhere in the code. ;
  686. ; No need for scan line generation, just return ;
  687. ;---------------------------------------------------;
  688. _NTSC_Blank_Line_36: ;
  689. _NTSC_Blank_Line_37: ;
  690. _NTSC_Blank_Line_38: ;
  691. _NTSC_Blank_Line_39: ;
  692. _NTSC_Blank_Line_40: ;
  693. _NTSC_Blank_Line_41: ;
  694. _NTSC_Blank_Line_243: ;
  695. _NTSC_Blank_Line_244: ;
  696. _NTSC_Blank_Line_245: ;
  697. _NTSC_Blank_Line_246: ;
  698. _NTSC_Blank_Line_247: ;
  699. _NTSC_Blank_Line_248: ;
  700. ;---------------------------------------------------;
  701. RETURN ;
  702. ;---------------------------------------------------;
  703.  
  704. ;---------------------------------------------------;
  705. ; Unused scan lines - they just do a blank line ;
  706. ;---------------------------------------------------;
  707. _NTSC_Blank_Line_18: ;
  708. _NTSC_Blank_Line_19: ;
  709. _NTSC_Blank_Line_20: ;
  710. _NTSC_Blank_Line_21: ;
  711. _NTSC_Blank_Line_22: ;
  712. _NTSC_Blank_Line_23: ;
  713. _NTSC_Blank_Line_24: ;
  714. _NTSC_Blank_Line_25: ;
  715. _NTSC_Blank_Line_26: ;
  716. _NTSC_Blank_Line_27: ;
  717. _NTSC_Blank_Line_28: ;
  718. _NTSC_Blank_Line_29: ;
  719. _NTSC_Blank_Line_30: ;
  720. _NTSC_Blank_Line_251: ;
  721. _NTSC_Blank_Line_252: ;
  722. _NTSC_Blank_Line_253: ;
  723. _NTSC_Blank_Line_254: ;
  724. _NTSC_Blank_Line_255: ;
  725. _NTSC_Blank_Line_256: ;
  726. _NTSC_Blank_Line_257: ;
  727. _NTSC_Blank_Line_258: ;
  728. _NTSC_Blank_Line_259: ;
  729. _NTSC_Blank_Line_260: ;
  730. _NTSC_Blank_Line_261: ;
  731. _NTSC_Blank_Line_262: ;
  732. ;---------------------------------------------------;
  733. PAGESEL _BLACK_4us_SYNC_60us_LINE ;
  734. CALL _BLACK_4us_SYNC_60us_LINE ;
  735. PAGESEL $ ;
  736. RETURN ;
  737. ;---------------------------------------------------;
  738.  
  739. ;---------------------------------------------------;
  740. _Update_Paddles: ;
  741. ;---------------------------------------------------;
  742. ; 60us BLACK line ;
  743. ;-----------------------------------------------;
  744. PAGESEL _BLACK_4us_SYNC_60us_LINE ;
  745. CALL _BLACK_4us_SYNC_60us_LINE ;
  746. PAGESEL $ ;
  747. ;-----------------------------------------------;
  748. #IF (_DISABLE_GAME_PROCESSING_ == TRUE) ;
  749. GOTO _UP1_Exit ;
  750. #ENDIF ;
  751. ;
  752. #IF _USE_THUMBSTICKS_ ;
  753. _UP1_Update: ;
  754. ;-----------------------------------------------;
  755. ; ADC Magic (Channel 0) ;
  756. ;-----------------------------------------------;
  757. BANKSEL ADCON1 ;
  758. MOVLW H'60' ; Left Justified
  759. MOVWF ADCON1 ; FOSC/64, VREF
  760. MOVLW B'00001011' ; AN2, ADC GO, ADC On
  761. MOVWF ADCON0 ;
  762. BTFSC ADCON0, GO ; Wait for conversion
  763. GOTO $-1 ;
  764. MOVFW ADRESH ; Get result
  765. BANKSEL MEMORY ;
  766. ;-----------------------------------------------;
  767. ;
  768. ;-----------------------------------------------;
  769. ; The following code uses the joystick in a ;
  770. ; normal fashion - paddle position follows the ;
  771. ; joystick position. ;
  772. ;-----------------------------------------------;
  773. MOVWF Temp1 ;
  774. XORWF Paddle_1_Y, W ;
  775. BTFSS STATUS, Z ;
  776. GOTO $+3 ;
  777. CLRF Paddle_1_Dir_Y ;
  778. GOTO _UP1_U_Process_JS ;
  779. MOVFW Temp1 ;
  780. SUBWF Paddle_1_Y, W ;
  781. MOVLW 1 ;
  782. BTFSC STATUS, C ;
  783. MOVLW -1 ;
  784. MOVWF Paddle_1_Dir_Y ;
  785. ;-----------------------------------------------;
  786. _UP1_U_Process_JS: ;
  787. ;-----------------------------------------------;
  788. MOVFW Temp1 ;
  789. MOVWF Paddle_1_Y ;
  790. RRF Paddle_1_Y, F ;
  791. RRF Paddle_1_Y, F ;
  792. MOVLW H'3F' ;
  793. ANDWF Paddle_1_Y, F ;
  794. MOVLW 23 ;
  795. SUBWF Paddle_1_Y, F ;
  796. ;-----------------------------------------------;
  797. ;
  798. ;-----------------------------------------------;
  799. ; The following code uses the joystick in a ;
  800. ; button fashion - once the joystick crosses a ;
  801. ; certain threshold (position), the joystick ;
  802. ; reading is treating as an UP or DOWN button ;
  803. ; press and either increments or decrements the ;
  804. ; paddle position. ;
  805. ;-----------------------------------------------;
  806. ; MOVWF Temp1 ;
  807. ; MOVLW H'90' ;
  808. ; SUBWF Temp1, W ;
  809. ; BTFSS STATUS, C ;
  810. ; DECF Paddle_1_Y, F ;
  811. ; MOVLW H'98' ;
  812. ; SUBWF Temp1, W ;
  813. ; BTFSC STATUS, C ;
  814. ; INCF Paddle_1_Y, F ;
  815. ;-----------------------------------------------;
  816. ;
  817. ;-----------------------------------------------;
  818. ; Make sure the paddle position stays within the;
  819. ; range of the field. ;
  820. ;-----------------------------------------------;
  821. _UP1_Limit_Paddle_Position: ;
  822. ;-----------------------------------------------;
  823. ; Lower Limit ;
  824. ;-----------------------------------------------;
  825. BTFSC Paddle_1_Y, MSB ;
  826. CLRF Paddle_1_Y ;
  827. ;-----------------------------------------------;
  828. ; Upper Limit ;
  829. ;-----------------------------------------------;
  830. MOVLW NUM_LINES - PADDLE_HEIGHT ;
  831. SUBWF Paddle_1_Y, W ;
  832. BTFSS STATUS, C ;
  833. GOTO _UP1_Update_Done ;
  834. MOVLW NUM_LINES - PADDLE_HEIGHT ;
  835. MOVWF Paddle_1_Y ;
  836. ;-----------------------------------------------;
  837. ;
  838. _UP1_Update_Done: ;
  839. #ELSE ;!_USE_THUMBSTICKS_ ;
  840. _UP1_Check_Up: ;
  841. CLRW ;
  842. XORWF Paddle_1_Y, W ;
  843. BTFSC STATUS, Z ;
  844. GOTO _UP1_Check_Down ;
  845. BTFSS PORTA, LBUTT_1_BIT ;
  846. DECF Paddle_1_Y, F ;
  847. _UP1_Check_Down: ;
  848. MOVLW NUM_LINES - PADDLE_HEIGHT ;
  849. XORWF Paddle_1_Y, W ;
  850. BTFSC STATUS, Z ;
  851. GOTO _UP1_Draw_Paddle ;
  852. BTFSS PORTA, LBUTT_2_BIT ;
  853. INCF Paddle_1_Y, F ;
  854. #ENDIF ;_USE_THUMBSTICKS_ ;
  855. ;-----------------------------------------------;
  856. ;
  857. _UP1_Exit: ;
  858. ;-----------------------------------------------;
  859. ; 60us BLACK line ;
  860. ;-----------------------------------------------;
  861. PAGESEL _BLACK_4us_SYNC_60us_LINE ;
  862. CALL _BLACK_4us_SYNC_60us_LINE ;
  863. PAGESEL $ ;
  864. ;-----------------------------------------------;
  865. #IF (_DISABLE_GAME_PROCESSING_ == TRUE) ;
  866. GOTO _UP2_Exit ;
  867. #ENDIF ;
  868. ;
  869. #IF _USE_THUMBSTICKS_ ;
  870. _UP2_Update: ;
  871. BTFSC System_Status, P2_COMPUTER_BIT ;
  872. GOTO _UP2_Computer ;
  873. ;
  874. ;-----------------------------------------------;
  875. ;-----------------------------------------------;
  876. _UP2_Human: ;
  877. ;-----------------------------------------------;
  878. ; ADC Magic (Channel 0) ;
  879. ;-----------------------------------------------;
  880. BANKSEL ADCON1 ;
  881. MOVLW H'60' ; Left Justified
  882. MOVWF ADCON1 ; FOSC/64, VREF
  883. MOVLW B'00000011' ; AN0, ADC GO, ADC On
  884. MOVWF ADCON0 ;
  885. BTFSC ADCON0, GO ; Wait for conversion
  886. GOTO $-1 ;
  887. MOVFW ADRESH ; Get result
  888. BANKSEL MEMORY ;
  889. ;-----------------------------------------------;
  890. ;
  891. MOVWF Temp1 ;
  892. MOVLW H'60' ;
  893. SUBWF Temp1, W ;
  894. BTFSS STATUS, C ;
  895. INCF Paddle_2_Y, F ;
  896. MOVLW H'9F' ;
  897. SUBWF Temp1, W ;
  898. BTFSC STATUS, C ;
  899. DECF Paddle_2_Y, F ;
  900. BTFSC Paddle_2_Y, MSB ;
  901. CLRF Paddle_2_Y ;
  902. MOVLW NUM_LINES - PADDLE_HEIGHT ;
  903. SUBWF Paddle_2_Y, W ;
  904. BTFSS STATUS, C ;
  905. GOTO _UP2_Human_Done ;
  906. MOVLW NUM_LINES - PADDLE_HEIGHT ;
  907. MOVWF Paddle_2_Y ;
  908. _UP2_Human_Done: ;
  909. GOTO _UP2_Exit ;
  910. ;-----------------------------------------------;
  911. ;
  912. ;-----------------------------------------------;
  913. ;-----------------------------------------------;
  914. _UP2_Computer: ;
  915. ;-----------------------------------------------;
  916. MOVLW (FIELD_WIDTH * 3) / 4 ;
  917. SUBWF Ball_X, W ;
  918. BTFSS STATUS, C ;
  919. GOTO _UP2_C_Done ;
  920. ;-----------------------------------------------;
  921. ;
  922. ;-----------------------------------------------;
  923. _UP2_C_Follow_Ball: ;
  924. ;-----------------------------------------------;
  925. CLRF Paddle_2_Dir_Y ;
  926. MOVFW Paddle_2_Y ;
  927. ADDLW PADDLE_HEIGHT / 2 ;
  928. SUBWF Ball_Y, W ;
  929. BTFSC STATUS, C ;
  930. GOTO $+4 ;
  931. DECF Paddle_2_Y, F ;
  932. MOVLW -1 ;
  933. MOVWF Paddle_2_Dir_Y ;
  934. ;-----------------------------------------------;
  935. MOVFW Paddle_2_Y ;
  936. ADDLW PADDLE_HEIGHT / 2 ;
  937. SUBWF Ball_Y, W ;
  938. BTFSS STATUS, C ;
  939. GOTO $+4 ;
  940. INCF Paddle_2_Y, F ;
  941. MOVLW 1 ;
  942. MOVWF Paddle_2_Dir_Y ;
  943. ;-----------------------------------------------;
  944. GOTO _UP2_C_Limit_Paddle ;
  945. ;-----------------------------------------------;
  946. ;
  947. ;-----------------------------------------------;
  948. _UP2_C_Follow_Paddle: ;
  949. ;-----------------------------------------------;
  950. MOVFW Paddle_2_Y ;
  951. ADDLW PADDLE_HEIGHT / 2 ;
  952. SUBWF Paddle_1_Y, W ;
  953. BTFSS STATUS, C ;
  954. DECF Paddle_2_Y, F ;
  955. ;-----------------------------------------------;
  956. MOVFW Paddle_2_Y ;
  957. ADDLW PADDLE_HEIGHT / 2 ;
  958. SUBWF Paddle_1_Y, W ;
  959. BTFSC STATUS, C ;
  960. INCF Paddle_2_Y, F ;
  961. ;-----------------------------------------------;
  962. GOTO _UP2_C_Limit_Paddle ;
  963. ;-----------------------------------------------;
  964. ;
  965. ;-----------------------------------------------;
  966. _UP2_C_Limit_Paddle: ;
  967. ;-----------------------------------------------;
  968. BTFSC Paddle_2_Y, MSB ;
  969. CLRF Paddle_2_Y ;
  970. MOVLW NUM_LINES - PADDLE_HEIGHT ;
  971. SUBWF Paddle_2_Y, W ;
  972. BTFSS STATUS, C ;
  973. GOTO _UP2_C_Done ;
  974. MOVLW NUM_LINES - PADDLE_HEIGHT ;
  975. MOVWF Paddle_2_Y ;
  976. ;-----------------------------------------------;
  977. ;
  978. ;-----------------------------------------------;
  979. _UP2_C_Done: ;
  980. ;-----------------------------------------------;
  981. GOTO _UP2_Exit ;
  982. ;-----------------------------------------------;
  983. ;
  984. #ELSE ;!_USE_THUMBSTICKS_ ;
  985. _UP2_Check_Up: ;
  986. CLRW ;
  987. XORWF Paddle_2_Y, W ;
  988. BTFSC STATUS, Z ;
  989. GOTO _UP2_Check_Down ;
  990. BTFSS PORTA, RBUTT_1_BIT ;
  991. DECF Paddle_2_Y, F ;
  992. _UP2_Check_Down: ;
  993. MOVLW NUM_LINES - PADDLE_HEIGHT ;
  994. XORWF Paddle_2_Y, W ;
  995. BTFSC STATUS, Z ;
  996. GOTO _UP2_Draw_Paddle ;
  997. BTFSS PORTA, RBUTT_2_BIT ;
  998. INCF Paddle_2_Y, F ;
  999. #ENDIF ;_USE_THUMBSTICKS_ ;
  1000. ;
  1001. _UP2_Exit: ;
  1002. RETURN ;
  1003. ;---------------------------------------------------;
  1004.  
  1005. ;---------------------------------------------------;
  1006. _Update_Ball: ;
  1007. ;---------------------------------------------------;
  1008. ; 60us BLACK line ;
  1009. ;-----------------------------------------------;
  1010. PAGESEL _BLACK_4us_SYNC_60us_LINE ;
  1011. CALL _BLACK_4us_SYNC_60us_LINE ;
  1012. PAGESEL $ ;
  1013. ;-----------------------------------------------;
  1014. #IF (_DISABLE_GAME_PROCESSING_ == TRUE) ;
  1015. GOTO _UB_Exit ;
  1016. #ENDIF ;
  1017. ;
  1018. _UB_Check_Wait: ;
  1019. ;-----------------------------------------------;
  1020. ; This is the delay so the ball isn't so fast ;
  1021. ;-----------------------------------------------;
  1022. DECFSZ Ball_Wait, F ;
  1023. GOTO _UB_Exit ;
  1024. ;
  1025. MOVLW MAX_BALL_WAIT ;
  1026. MOVWF Ball_Wait ;
  1027. ;-----------------------------------------------;
  1028. ;
  1029. ;-----------------------------------------------;
  1030. ; Is the ball moving? (Ball_Dir_X or Ball_Dir_Y ;
  1031. ; not equal to zero?) If so, update the ball ;
  1032. ; position. Otherwise, check for serve. ;
  1033. ;-----------------------------------------------;
  1034. CLRW ;
  1035. XORWF Ball_Dir_X, W ;
  1036. BTFSS STATUS, Z ;
  1037. GOTO _UB_Update_Ball_X ;
  1038. CLRW ;
  1039. XORWF Ball_Dir_Y, W ;
  1040. BTFSS STATUS, Z ;
  1041. GOTO _UB_Update_Ball_X ;
  1042. ;-----------------------------------------------;
  1043. ;
  1044. ;-----------------------------------------------;
  1045. ; Check if left player pushed button to serve ;
  1046. ;-----------------------------------------------;
  1047. _UB_Check_L_Serve: ;
  1048. BTFSS System_Status, P1_SERVICE_BIT ;
  1049. GOTO _UB_Check_R_Serve ;
  1050. BTFSC PORTA, LBUTT_BIT ;
  1051. GOTO _UB_Check_L_Unpressed ;
  1052. BTFSC System_Status, P1_PRESSED_BIT ;
  1053. GOTO _UB_Check_R_Serve ;
  1054. BSF System_Status, P1_PRESSED_BIT ;
  1055. BCF System_Status, P1_SERVICE_BIT ;
  1056. BCF System_Status, P2_SERVICE_BIT ;
  1057. MOVLW 1 ;
  1058. MOVWF Ball_Dir_X ;
  1059. MOVFW Paddle_1_Y ;
  1060. ADDLW PADDLE_HEIGHT / 2 ;
  1061. SUBLW NUM_LINES / 2 ;
  1062. MOVLW -2 ;
  1063. BTFSC STATUS, C ;
  1064. MOVLW 1 ;
  1065. MOVWF Ball_Dir_Y ;
  1066. MOVLW 2 ;
  1067. MOVWF Ball_X ;
  1068. MOVFW Paddle_1_Y ;
  1069. ADDLW PADDLE_HEIGHT / 2 ;
  1070. MOVWF Ball_Y ;
  1071. GOTO _UB_Service ;
  1072. _UB_Check_L_Unpressed: ;
  1073. BCF System_Status, P1_PRESSED_BIT ;
  1074. ;-----------------------------------------------;
  1075. ;
  1076. ;-----------------------------------------------;
  1077. ; Check if right player pushed button to serve ;
  1078. ;-----------------------------------------------;
  1079. _UB_Check_R_Serve: ;
  1080. BTFSC System_Status, P2_COMPUTER_BIT ;
  1081. GOTO _UB_CRS_Computer ;
  1082. ;-----------------------------------------------;
  1083. _UB_CRS_Human: ;
  1084. BTFSS System_Status, P2_SERVICE_BIT ;
  1085. GOTO _UB_Exit ;
  1086. #IF (_AUDIO_ENABLED_ == TRUE) ;
  1087. BTFSC Video_Status, AUDIO_ENABLED_BIT ;
  1088. GOTO _UB_Exit ;
  1089. BANKSEL TRISA ;
  1090. BSF TRISA, RBUTT_BIT ; Set as input (for BUTTON)
  1091. BANKSEL PORTA ;
  1092. #ENDIF ; (_AUDIO_ENABLED_ == TRUE) ;
  1093. BTFSC PORTA, RBUTT_BIT ;
  1094. GOTO _UB_CRS_Unpressed ;
  1095. #IF (_AUDIO_ENABLED_ == TRUE) ;
  1096. BANKSEL TRISA ;
  1097. BCF TRISA, RBUTT_BIT ; Set as output (for AUDIO)
  1098. BANKSEL MEMORY ;
  1099. #ENDIF ; (_AUDIO_ENABLED_ == TRUE) ;
  1100. BTFSC System_Status, P2_PRESSED_BIT ;
  1101. GOTO _UB_Exit ;
  1102. #IF (_AUDIO_ENABLED_ == TRUE) ;
  1103. BANKSEL TRISA ;
  1104. BCF TRISA, RBUTT_BIT ; Set as output (for AUDIO)
  1105. BANKSEL MEMORY ;
  1106. #ENDIF ; (_AUDIO_ENABLED_ == TRUE) ;
  1107. GOTO _UB_CRS_Init ;
  1108. ;-----------------------------------------------;
  1109. ;
  1110. ;-----------------------------------------------;
  1111. _UB_CRS_Computer: ;
  1112. BTFSS System_Status, P1_SERVICE_BIT ;
  1113. BTFSS System_Status, P2_SERVICE_BIT ;
  1114. GOTO _UB_CRS_Unpressed ;
  1115. BTFSC System_Status, P2_PRESSED_BIT ;
  1116. ;-----------------------------------------------;
  1117. ;
  1118. ;-----------------------------------------------;
  1119. _UB_CRS_Init: ;
  1120. BSF System_Status, P2_PRESSED_BIT ;
  1121. BCF System_Status, P1_SERVICE_BIT ;
  1122. BCF System_Status, P2_SERVICE_BIT ;
  1123. MOVLW -1 ;
  1124. MOVWF Ball_Dir_X ;
  1125. MOVFW Paddle_2_Y ;
  1126. ADDLW PADDLE_HEIGHT / 2 ;
  1127. SUBLW NUM_LINES / 2 ;
  1128. MOVLW -1 ;
  1129. BTFSC STATUS, C ;
  1130. MOVLW 2 ;
  1131. MOVWF Ball_Dir_Y ;
  1132. MOVLW 29 ;
  1133. MOVWF Ball_X ;
  1134. MOVFW Paddle_2_Y ;
  1135. ADDLW PADDLE_HEIGHT / 2 ;
  1136. MOVWF Ball_Y ;
  1137. GOTO _UB_Service ;
  1138. ;-----------------------------------------------;
  1139. ;
  1140. ;-----------------------------------------------;
  1141. _UB_CRS_Unpressed: ;
  1142. BCF System_Status, P2_PRESSED_BIT ;
  1143. GOTO _UB_Exit ;
  1144. ;-----------------------------------------------;
  1145. ;
  1146. ;-----------------------------------------------;
  1147. _UB_Service: ;
  1148. MOVLW H'11' ;
  1149. XORWF Score_1, W ;
  1150. BTFSC STATUS, Z ;
  1151. GOTO $+5 ;
  1152. MOVLW H'11' ;
  1153. XORWF Score_2, W ;
  1154. BTFSS STATUS, Z ;
  1155. GOTO _UB_Exit ;
  1156. CLRF Score_1 ;
  1157. CLRF Score_2 ;
  1158. GOTO _UB_Exit ;
  1159. ;-----------------------------------------------;
  1160. ;
  1161. ;-----------------------------------------------;
  1162. _UB_Update_Ball_X: ;
  1163. MOVFW Ball_Dir_X ; Update Ball X Position
  1164. ADDWF Ball_X, F ;
  1165. ;-----------------------------------------------;
  1166. ;
  1167. ;-----------------------------------------------;
  1168. _UB_Update_Ball_X_Min: ;
  1169. MOVLW 0 ;
  1170. XORWF Ball_X, W ;
  1171. BTFSS STATUS, Z ;
  1172. GOTO _UB_Update_Ball_X_Max ;
  1173. MOVLW 1 ;
  1174. MOVWF Ball_Dir_X ;
  1175. ;
  1176. INCF Score_2, F ;
  1177. #IF (_AUDIO_ENABLED_ == TRUE) ;
  1178. ;-----------------------------------------------;
  1179. ; Play the 'Ball Was Missed' sound ;
  1180. ;-----------------------------------------------;
  1181. PLAY_SOUND 24, H'017F' ; Frequency, Duration
  1182. #ENDIF ; (_AUDIO_ENABLED_ == TRUE) ;
  1183. BCF System_Status, P1_SERVICE_BIT ;
  1184. BSF System_Status, P2_SERVICE_BIT ;
  1185. MOVLW 0 ;
  1186. MOVWF Ball_Dir_X ;
  1187. MOVWF Ball_Dir_Y ;
  1188. MOVLW 15 ;
  1189. MOVWF Ball_X ;
  1190. MOVLW 27 ;
  1191. MOVWF Ball_Y ;
  1192. MOVFW Score_2 ;
  1193. ANDLW H'0F' ;
  1194. XORLW H'0A' ;
  1195. BTFSS STATUS, Z ;
  1196. GOTO _UB_BXMin_Exit ;
  1197. MOVFW Score_2 ;
  1198. ANDLW H'F0' ;
  1199. ADDLW H'10' ;
  1200. MOVWF Score_2 ;
  1201. MOVLW H'A0' ;
  1202. XORWF Score_2, W ;
  1203. BTFSC STATUS, Z ;
  1204. CLRF Score_2 ;
  1205. _UB_BXMin_Exit: ;
  1206. MOVLW H'11' ;
  1207. XORWF Score_2, W ;
  1208. BTFSS STATUS, Z ;
  1209. GOTO _UB_Exit ;
  1210. BSF System_Status, P1_SERVICE_BIT ;
  1211. BSF System_Status, P2_SERVICE_BIT ;
  1212. GOTO _UB_Exit ;
  1213. ;-----------------------------------------------;
  1214. ;
  1215. ;-----------------------------------------------;
  1216. _UB_Update_Ball_X_Max: ;
  1217. MOVLW 31 ;
  1218. XORWF Ball_X, W ;
  1219. BTFSS STATUS, Z ;
  1220. GOTO _UB_Update_Ball_Y ;
  1221. MOVLW -1 ;
  1222. MOVWF Ball_Dir_X ;
  1223. ;
  1224. INCF Score_1, F ;
  1225. #IF (_AUDIO_ENABLED_ == TRUE) ;
  1226. ;-----------------------------------------------;
  1227. ; Play the 'Ball Was Missed' sound ;
  1228. ;-----------------------------------------------;
  1229. PLAY_SOUND 24, H'017F' ; Frequency, Duration
  1230. #ENDIF ; (_AUDIO_ENABLED_ == TRUE) ;
  1231. BSF System_Status, P1_SERVICE_BIT ;
  1232. BCF System_Status, P2_SERVICE_BIT ;
  1233. MOVLW 0 ;
  1234. MOVWF Ball_Dir_X ;
  1235. MOVWF Ball_Dir_Y ;
  1236. MOVLW 15 ;
  1237. MOVWF Ball_X ;
  1238. MOVLW 27 ;
  1239. MOVWF Ball_Y ;
  1240. MOVFW Score_1 ;
  1241. ANDLW H'0F' ;
  1242. XORLW H'0A' ;
  1243. BTFSS STATUS, Z ;
  1244. GOTO _UB_BXMax_Exit ;
  1245. MOVFW Score_1 ;
  1246. ANDLW H'F0' ;
  1247. ADDLW H'10' ;
  1248. MOVWF Score_1 ;
  1249. MOVLW H'A0' ;
  1250. XORWF Score_1, W ;
  1251. BTFSC STATUS, Z ;
  1252. CLRF Score_1 ;
  1253. _UB_BXMax_Exit: ;
  1254. MOVLW H'11' ;
  1255. XORWF Score_1, W ;
  1256. BTFSS STATUS, Z ;
  1257. GOTO _UB_Exit ;
  1258. BSF System_Status, P1_SERVICE_BIT ;
  1259. BSF System_Status, P2_SERVICE_BIT ;
  1260. GOTO _UB_Exit ;
  1261. ;-----------------------------------------------;
  1262. ;
  1263. ;-----------------------------------------------;
  1264. ; Update Ball_Y position ;
  1265. ;-----------------------------------------------;
  1266. _UB_Update_Ball_Y: ;
  1267. MOVFW Ball_Dir_Y ;
  1268. ADDWF Ball_Y, F ;
  1269. ;-----------------------------------------------;
  1270. ;
  1271. ;-----------------------------------------------;
  1272. ; Check for collision with upper sideline ;
  1273. ;-----------------------------------------------;
  1274. _UB_Update_Ball_Y_Min: ;
  1275. BTFSS Ball_Y, MSB ;
  1276. GOTO _UB_Update_Ball_Y_Max ;
  1277. COMF Ball_Y, F ;
  1278. COMF Ball_Dir_Y, F ;
  1279. INCF Ball_Dir_Y, F ;
  1280. #IF (_AUDIO_ENABLED_ == TRUE) ;
  1281. ;-----------------------------------------------;
  1282. ; Play the 'Ball Hit Sideline' sound ;
  1283. ;-----------------------------------------------;
  1284. PLAY_SOUND 6, H'017F' ; Frequency, Duration
  1285. #ENDIF ; (_AUDIO_ENABLED_ == TRUE) ;
  1286. GOTO _UB_Paddle_Detect_Left ;
  1287. ;-----------------------------------------------;
  1288. ;
  1289. ;-----------------------------------------------;
  1290. ; Check for collision with lower sideline ;
  1291. ;-----------------------------------------------;
  1292. _UB_Update_Ball_Y_Max: ;
  1293. MOVLW NUM_LINES - 2 ;
  1294. SUBWF Ball_Y, W ;
  1295. BTFSS STATUS, C ;
  1296. GOTO _UB_Paddle_Detect_Left ;
  1297. MOVLW NUM_LINES - 2 ;
  1298. MOVWF Ball_Y ;
  1299. COMF Ball_Dir_Y, F ;
  1300. INCF Ball_Dir_Y, F ;
  1301. #IF (_AUDIO_ENABLED_ == TRUE) ;
  1302. ;-----------------------------------------------;
  1303. ; Play the 'Ball Hit Sideline' sound ;
  1304. ;-----------------------------------------------;
  1305. PLAY_SOUND 6, H'017F' ; Frequency, Duration
  1306. ;-----------------------------------------------;
  1307. #ENDIF ; (_AUDIO_ENABLED_ == TRUE) ;
  1308. ;
  1309. ;-----------------------------------------------;
  1310. ; Check for collision with left paddle ;
  1311. ;-----------------------------------------------;
  1312. _UB_Paddle_Detect_Left: ;
  1313. ;-----------------------------------------------;
  1314. ; On the same vertical line as the left paddle? ;
  1315. ;-----------------------------------------------;
  1316. MOVLW 1 ;
  1317. XORWF Ball_X, W ;
  1318. BTFSS STATUS, Z ;
  1319. GOTO _UB_Paddle_Detect_Right ;
  1320. ;
  1321. MOVFW Paddle_1_Y ;
  1322. MOVWF Temp1 ;
  1323. MOVFW Paddle_1_Dir_Y ;
  1324. MOVWF Temp2 ;
  1325. GOTO _UB_PD_Check_Hit ;
  1326. ;
  1327. ;-----------------------------------------------;
  1328. ; Check for collision with right paddle ;
  1329. ;-----------------------------------------------;
  1330. _UB_Paddle_Detect_Right: ;
  1331. ;-----------------------------------------------;
  1332. ; On the same vertical line as the right paddle?;
  1333. ;-----------------------------------------------;
  1334. MOVLW 30 ;
  1335. XORWF Ball_X, W ;
  1336. BTFSS STATUS, Z ;
  1337. GOTO _UB_Exit ;
  1338. MOVFW Paddle_2_Y ;
  1339. MOVWF Temp1 ;
  1340. MOVFW Paddle_2_Dir_Y ;
  1341. MOVWF Temp2 ;
  1342. ;-----------------------------------------------;
  1343. ;
  1344. _UB_PD_Check_Hit: ;
  1345. ;-----------------------------------------------;
  1346. ; Are we on the save horizontal plane as the ;
  1347. ; paddle? ;
  1348. ;-----------------------------------------------;
  1349. MOVFW Ball_Y ;
  1350. ADDLW BALL_HEIGHT ;
  1351. SUBWF Temp1, W ;
  1352. BTFSC STATUS, C ;
  1353. GOTO _UB_Exit ;
  1354. ;
  1355. MOVLW PADDLE_HEIGHT - 1 ;
  1356. ADDWF Temp1, F ;
  1357. MOVFW Ball_Y ;
  1358. SUBWF Temp1, W ;
  1359. BTFSS STATUS, C ;
  1360. GOTO _UB_Exit ;
  1361. ;
  1362. _UB_PD_Its_A_Hit: ;
  1363. ;-----------------------------------------------;
  1364. ; Reverse the ball 'X' direction ;
  1365. ;-----------------------------------------------;
  1366. COMF Ball_Dir_X, F ;
  1367. INCF Ball_Dir_X, F ;
  1368. ;-----------------------------------------------;
  1369. ; Adjust the ball 'X' position ;
  1370. ;-----------------------------------------------;
  1371. MOVFW Ball_Dir_X ;
  1372. ADDWF Ball_X, F ;
  1373. ;-----------------------------------------------;
  1374. ; This is a crude form of 'english' ;
  1375. ;-----------------------------------------------;
  1376. MOVFW Temp2 ;
  1377. ADDWF Ball_Dir_Y, F ;
  1378. MOVLW -3 ;
  1379. XORWF Ball_Dir_Y, W ;
  1380. MOVLW -2 ;
  1381. BTFSC STATUS, Z ;
  1382. MOVWF Ball_Dir_Y ;
  1383. MOVLW 3 ;
  1384. XORWF Ball_Dir_Y, W ;
  1385. MOVLW 2 ;
  1386. BTFSC STATUS, Z ;
  1387. MOVWF Ball_Dir_Y ;
  1388. _UB_PD_IAH_Done: ;
  1389. #IF (_AUDIO_ENABLED_ == TRUE) ;
  1390. ;-----------------------------------------------;
  1391. ; Play the 'Ball Hit Paddle' sound ;
  1392. ;-----------------------------------------------;
  1393. PLAY_SOUND 8, H'014F' ; Frequency, Duration
  1394. ;-----------------------------------------------;
  1395. #ENDIF ; (_AUDIO_ENABLED_ == TRUE) ;
  1396. ;
  1397. ;-----------------------------------------------;
  1398. ; Ball update done. Restore RBUTT as an output ;
  1399. ; for sound and wait for 60us to pass. ;
  1400. ;-----------------------------------------------;
  1401. _UB_Exit: ;
  1402. #IF (_AUDIO_ENABLED_ == TRUE) ;
  1403. BANKSEL TRISA ;
  1404. BCF TRISA, RBUTT_BIT ; Set as OUTPUT (for AUDIO)
  1405. BANKSEL MEMORY ;
  1406. #ENDIF ; (_AUDIO_ENABLED_ == TRUE) ;
  1407. ;
  1408. RETURN ;
  1409. ;---------------------------------------------------;
  1410.  
  1411. ;---------------------------------------------------;
  1412. _Draw_Items: ;
  1413. ;---------------------------------------------------;
  1414. ;-----------------------------------------------;
  1415. ; 60us BLACK Line ;
  1416. ;-----------------------------------------------;
  1417. PAGESEL _BLACK_4us_SYNC_60us_LINE ;
  1418. CALL _BLACK_4us_SYNC_60us_LINE ;
  1419. PAGESEL $ ;
  1420. ;-----------------------------------------------;
  1421. #IF (_DISABLE_GAME_PROCESSING_ == TRUE) ;
  1422. GOTO _DI_Exit_1 ;
  1423. #ENDIF ;
  1424. ;
  1425. ;-----------------------------------------------;
  1426. _DI_Draw_Service_Player_1: ;
  1427. ;-----------------------------------------------;
  1428. MOVLW LOW VIDEO_BUFFER_START + SERVICE_1_START;
  1429. MOVWF FSR1L ;
  1430. MOVLW H'0F' ;
  1431. BTFSS System_Status, P1_SERVICE_BIT ;
  1432. CLRW ;
  1433. BTFSC System_Status, P2_SERVICE_BIT ;
  1434. CLRW ;
  1435. CALL _DI_Draw_Service ;
  1436. ;-----------------------------------------------;
  1437.  
  1438. ;-----------------------------------------------;
  1439. _DI_Draw_Service_Player_2: ;
  1440. ;-----------------------------------------------;
  1441. MOVLW LOW VIDEO_BUFFER_START + SERVICE_2_START;
  1442. MOVWF FSR1L ;
  1443. MOVLW H'F0' ;
  1444. BTFSS System_Status, P2_SERVICE_BIT ;
  1445. CLRW ;
  1446. BTFSC System_Status, P1_SERVICE_BIT ;
  1447. CLRW ;
  1448. CALL _DI_Draw_Service ;
  1449. ;
  1450. GOTO _DI_DS_Done ;
  1451. ;-----------------------------------------------;
  1452. ;
  1453. ;-----------------------------------------------;
  1454. _DI_Draw_Service: ;
  1455. ;-----------------------------------------------;
  1456. MOVWF Temp1 ;
  1457. MOVLW HIGH VIDEO_BUFFER_START ;
  1458. MOVWF FSR1H ;
  1459. MOVLW LOW SERVICE_ARROW_START ;
  1460. MOVWF FSR0L ;
  1461. MOVLW HIGH SERVICE_ARROW_START ;
  1462. MOVWF FSR0H ;
  1463. MOVLW (SERVICE_ARROW_END - SERVICE_ARROW_START)
  1464. MOVWF Line_Count ;
  1465. _DI_DS_Next_Byte: ;
  1466. MOVFW INDF0 ;
  1467. ANDWF Temp1, W ;
  1468. MOVWF INDF1 ;
  1469. ADDFSR FSR0, 1 ;
  1470. ADDFSR FSR1, 4 ;
  1471. DECFSZ Line_Count, F ;
  1472. GOTO _DI_DS_Next_Byte ;
  1473. RETURN ;
  1474. ;-----------------------------------------------;
  1475. ;
  1476. ;-----------------------------------------------;
  1477. _DI_DS_Done: ;
  1478. ;-----------------------------------------------;
  1479. ;
  1480. _DI_Exit_1: ;
  1481. ;-----------------------------------------------;
  1482. ; 60us BLACK Line ;
  1483. ;-----------------------------------------------;
  1484. PAGESEL _BLACK_4us_SYNC_60us_LINE ;
  1485. CALL _BLACK_4us_SYNC_60us_LINE ;
  1486. PAGESEL $ ;
  1487. ;-----------------------------------------------;
  1488. #IF (_DISABLE_GAME_PROCESSING_ == TRUE) ;
  1489. GOTO _DI_Exit_2 ;
  1490. #ENDIF ;
  1491. ;
  1492. ;-----------------------------------------------;
  1493. _DI_DSP1_Draw_Left_Char: ;
  1494. ;-----------------------------------------------;
  1495. SWAPF Score_1, W ;
  1496. ANDLW H'0F' ;
  1497. MOVWF Temp1 ;
  1498. MOVLW H'E0' ;
  1499. ;
  1500. CALL _DI_DSP1_Draw_Character ;
  1501. ;-----------------------------------------------;
  1502. ;
  1503. ;-----------------------------------------------;
  1504. _DI_DSP1_Draw_Right_Char: ;
  1505. ;-----------------------------------------------;
  1506. MOVFW Score_1 ;
  1507. ANDLW H'0F' ;
  1508. MOVWF Temp1 ;
  1509. MOVLW H'0E' ;
  1510. ;
  1511. CALL _DI_DSP1_Draw_Character ;
  1512. ;
  1513. GOTO _DI_DSP1_Done ;
  1514. ;-----------------------------------------------;
  1515. ;
  1516. ;-----------------------------------------------;
  1517. _DI_DSP1_Draw_Character: ;
  1518. ;-----------------------------------------------;
  1519. MOVWF Temp2 ;
  1520. ;
  1521. MOVLW LOW VIDEO_BUFFER_START + LEFT_SCORE_START
  1522. MOVWF FSR1L ;
  1523. ;
  1524. MOVLW HIGH VIDEO_BUFFER_START ;
  1525. MOVWF FSR1H ;
  1526. ;
  1527. MOVLW HIGH SCORE_FONT_START ;
  1528. MOVWF FSR0H ;
  1529. MOVLW LOW SCORE_FONT_START ;
  1530. ADDWF Temp1, W ;
  1531. BTFSC STATUS, C ;
  1532. INCF FSR0H, F ;
  1533. MOVWF FSR0L ;
  1534. ;
  1535. MOVLW 5 ;
  1536. MOVWF Line_Count ;
  1537. _DI_DSP1_DC_Next_Line: ;
  1538. MOVFW INDF0 ;
  1539. ANDWF Temp2, W ;
  1540. IORWF INDF1, F ;
  1541. ADDFSR FSR0, 10 ;
  1542. ADDFSR FSR1, 4 ;
  1543. DECFSZ Line_Count, F ;
  1544. GOTO _DI_DSP1_DC_Next_Line ;
  1545. ;
  1546. RETURN ;
  1547. ;-----------------------------------------------;
  1548. ;
  1549. ;-----------------------------------------------;
  1550. _DI_DSP1_Done: ;
  1551. ;-----------------------------------------------;
  1552. ;
  1553. ;-----------------------------------------------;
  1554. _DI_DSP2_Draw_Left_Char: ;
  1555. ;-----------------------------------------------;
  1556. SWAPF Score_2, W ;
  1557. ANDLW H'0F' ;
  1558. MOVWF Temp1 ;
  1559. MOVLW H'70' ;
  1560. ;
  1561. CALL _DI_DSP2_Draw_Character ;
  1562. ;-----------------------------------------------;
  1563. ;
  1564. ;-----------------------------------------------;
  1565. _DI_DSP2_Draw_Right_Char: ;
  1566. ;-----------------------------------------------;
  1567. MOVFW Score_2 ;
  1568. ANDLW H'0F' ;
  1569. MOVWF Temp1 ;
  1570. MOVLW H'07' ;
  1571. ;
  1572. CALL _DI_DSP2_Draw_Character ;
  1573. ;
  1574. GOTO _DI_DSP2_Done ;
  1575. ;-----------------------------------------------;
  1576. ;
  1577. ;-----------------------------------------------;
  1578. _DI_DSP2_Draw_Character: ;
  1579. ;-----------------------------------------------;
  1580. MOVWF Temp2 ;
  1581. ;
  1582. MOVLW LOW VIDEO_BUFFER_START + RIGHT_SCORE_START
  1583. MOVWF FSR1L ;
  1584. ;
  1585. MOVLW HIGH VIDEO_BUFFER_START ;
  1586. MOVWF FSR1H ;
  1587. ;
  1588. MOVLW HIGH SCORE_FONT_START ;
  1589. MOVWF FSR0H ;
  1590. MOVLW LOW SCORE_FONT_START ;
  1591. ADDWF Temp1, W ;
  1592. BTFSC STATUS, C ;
  1593. INCF FSR0H, F ;
  1594. MOVWF FSR0L ;
  1595. ;
  1596. MOVLW 5 ;
  1597. MOVWF Line_Count ;
  1598. _DI_DSP2_DC_Next_Line: ;
  1599. MOVFW INDF0 ;
  1600. MOVWF DTemp ;
  1601. RRF DTemp, W ;
  1602. ANDWF Temp2, W ;
  1603. IORWF INDF1, F ;
  1604. ADDFSR FSR0, 10 ;
  1605. ADDFSR FSR1, 4 ;
  1606. DECFSZ Line_Count, F ;
  1607. GOTO _DI_DSP2_DC_Next_Line ;
  1608. ;
  1609. RETURN ;
  1610. ;-----------------------------------------------;
  1611. ;
  1612. ;-----------------------------------------------;
  1613. _DI_DSP2_Done: ;
  1614. ;-----------------------------------------------;
  1615. ;
  1616. _DI_Exit_2: ;
  1617. ;-----------------------------------------------;
  1618. ; 60us BLACK Line ;
  1619. ;-----------------------------------------------;
  1620. PAGESEL _BLACK_4us_SYNC_60us_LINE ;
  1621. CALL _BLACK_4us_SYNC_60us_LINE ;
  1622. PAGESEL $ ;
  1623. ;-----------------------------------------------;
  1624. #IF (_DISABLE_GAME_PROCESSING_ == TRUE) ;
  1625. GOTO _DI_Exit_3 ;
  1626. #ENDIF ;
  1627. ;
  1628. _DI_Draw_Paddle_1: ;
  1629. MOVFW Paddle_1_Y ;
  1630. ADDWF Paddle_1_Y, W ;
  1631. ADDWF Paddle_1_Y, W ;
  1632. ADDWF Paddle_1_Y, W ;
  1633. ADDLW LOW VIDEO_BUFFER_START + LEFT_PADDLE_START
  1634. MOVWF FSR1L ;
  1635. MOVLW HIGH VIDEO_BUFFER_START ;
  1636. MOVLW PADDLE_HEIGHT ;
  1637. MOVWF Temp1 ;
  1638. _DI_DP1_Next_Bit: ;
  1639. MOVFW INDF1 ;
  1640. IORLW LEFT_PADDLE_BIT ;
  1641. MOVWF INDF1 ;
  1642. ADDFSR FSR1, 4 ;
  1643. DECFSZ Temp1, F ;
  1644. GOTO _DI_DP1_Next_Bit ;
  1645. ;
  1646. _DI_Draw_Paddle_2: ;
  1647. MOVFW Paddle_2_Y ;
  1648. ADDWF Paddle_2_Y, W ;
  1649. ADDWF Paddle_2_Y, W ;
  1650. ADDWF Paddle_2_Y, W ;
  1651. ADDLW LOW VIDEO_BUFFER_START + RIGHT_PADDLE_START;
  1652. MOVWF FSR1L ;
  1653. MOVLW HIGH VIDEO_BUFFER_START ;
  1654. MOVWF FSR1H ;
  1655. MOVLW PADDLE_HEIGHT ;
  1656. MOVWF Temp1 ;
  1657. _DI_DP2_Next_Bit: ;
  1658. MOVFW INDF1 ;
  1659. IORLW RIGHT_PADDLE_BIT ;
  1660. MOVWF INDF1 ;
  1661. ADDFSR FSR1, 4 ;
  1662. DECFSZ Temp1, F ;
  1663. GOTO _DI_DP2_Next_Bit ;
  1664. ;
  1665. _DI_Draw_Ball: ;
  1666. ;-----------------------------------------------;
  1667. ; Check to see if the ball has any movement. If ;
  1668. ; not, we are either at the end of a game or ;
  1669. ; waiting for service. In that case, don't draw ;
  1670. ; the ball. ;
  1671. ;-----------------------------------------------;
  1672. CLRW ;
  1673. XORWF Ball_Dir_X, W ;
  1674. BTFSS STATUS, Z ;
  1675. GOTO _DI_DB_Draw ;
  1676. CLRW ;
  1677. XORWF Ball_Dir_Y, W ;
  1678. BTFSC STATUS, Z ;
  1679. GOTO _DI_Exit_3 ;
  1680. MOVLW 1 ;
  1681. XORWF Ball_Wait, W ;
  1682. BTFSS STATUS, Z ;
  1683. GOTO _DI_Exit_3 ;
  1684. ;
  1685. _DI_DB_Draw: ;
  1686. ;-----------------------------------------------;
  1687. ; This is where we actually 'draw' the ball. ;
  1688. ;-----------------------------------------------;
  1689. MOVFW Ball_Y ;
  1690. ADDWF Ball_Y, W ;
  1691. ADDWF Ball_Y, W ;
  1692. ADDWF Ball_Y, W ;
  1693. ADDLW LOW VIDEO_BUFFER_START ;
  1694. MOVWF FSR1L ;
  1695. RRF Ball_X, W ;
  1696. MOVWF Temp1 ;
  1697. RRF Temp1, F ;
  1698. RRF Temp1, W ;
  1699. ANDLW H'1F' ;
  1700. ADDWF FSR1L, F ;
  1701. MOVLW HIGH VIDEO_BUFFER_START ;
  1702. MOVWF FSR1H ;
  1703. ;
  1704. MOVFW Ball_X ;
  1705. ANDLW H'07' ;
  1706. MOVWF Temp1 ;
  1707. MOVLW H'80' ;
  1708. MOVWF DTemp ;
  1709. MOVLW 0 ; ;
  1710. XORWF Temp1, W ;
  1711. BTFSC STATUS, Z ;
  1712. GOTO $+5 ;
  1713. DECF Temp1, F ;
  1714. RRF DTemp, F ;
  1715. BCF DTemp, MSB ;
  1716. GOTO $-7 ;
  1717. ;
  1718. MOVLW BALL_HEIGHT ;
  1719. MOVWF Temp1 ;
  1720. MOVFW DTemp ;
  1721. _DI_DB_D_Next_Pixel: ;
  1722. XORWF INDF1, F ;
  1723. ADDFSR FSR1, 4 ;
  1724. DECFSZ Temp1, F ;
  1725. GOTO _DI_DB_D_Next_Pixel ;
  1726. ;
  1727. _DI_Exit_3: ;
  1728. RETURN ;
  1729. ;---------------------------------------------------;
  1730.  
  1731. ;---------------------------------------------------;
  1732. _Clear_Screen: ;
  1733. ;---------------------------------------------------;
  1734. ; This is a 2 60us BLACK lines routine ;
  1735. ;---------------------------------------------------;
  1736. ;-----------------------------------------------;
  1737. ; 60us BLACK Line ;
  1738. ;-----------------------------------------------;
  1739. PAGESEL _BLACK_4us_SYNC_60us_LINE ;
  1740. CALL _BLACK_4us_SYNC_60us_LINE ;
  1741. PAGESEL $ ;
  1742. ;-----------------------------------------------;
  1743. #IF (_DISABLE_GAME_PROCESSING_ == TRUE) ;
  1744. GOTO _CS_T_Exit ;
  1745. #ENDIF ;
  1746. ;
  1747. _CS_Top: ;
  1748. ;-----------------------------------------------;
  1749. ; Set up the pointer to the video buffer ;
  1750. ;-----------------------------------------------;
  1751. MOVLW HIGH VIDEO_BUFFER_START ;
  1752. MOVWF FSR1H ;
  1753. MOVLW LOW VIDEO_BUFFER_START ;
  1754. MOVWF FSR1L ;
  1755. ;-----------------------------------------------;
  1756. ;
  1757. ;-----------------------------------------------;
  1758. ; Set up the pointer to the title graphic ;
  1759. ;-----------------------------------------------;
  1760. MOVLW HIGH TITLE_GRAPHIC_START ;
  1761. MOVWF FSR0H ;
  1762. MOVLW LOW TITLE_GRAPHIC_START ;
  1763. MOVWF FSR0L ;
  1764. ;-----------------------------------------------;
  1765. ;
  1766. ;-----------------------------------------------;
  1767. ; Set up the number of bytes to transfer ;
  1768. ;-----------------------------------------------;
  1769. MOVLW ((TITLE_GRAPHIC_END - TITLE_GRAPHIC_START) / 2) / 8
  1770. MOVWF Temp1 ;
  1771. ;-----------------------------------------------;
  1772. ;
  1773. ;-----------------------------------------------;
  1774. ; Transfer the data from the title graphic to ;
  1775. ; the video buffer, 8 bytes at a time. Doing it ;
  1776. ; in groups of 8 in a loop, instead of 1 byte at;
  1777. ; a time in a loop, speeds up the transfer as ;
  1778. ; it cuts out a lot of the instruction cycles ;
  1779. ; for the looping mechanism. ;
  1780. ;-----------------------------------------------;
  1781. _CS_T_Next_8_Bytes: ;
  1782. MOVIW 0[INDF0] ;
  1783. MOVWI 0[INDF1] ;
  1784. MOVIW 1[INDF0] ;
  1785. MOVWI 1[INDF1] ;
  1786. MOVIW 2[INDF0] ;
  1787. MOVWI 2[INDF1] ;
  1788. MOVIW 3[INDF0] ;
  1789. MOVWI 3[INDF1] ;
  1790. MOVIW 4[INDF0] ;
  1791. MOVWI 4[INDF1] ;
  1792. MOVIW 5[INDF0] ;
  1793. MOVWI 5[INDF1] ;
  1794. MOVIW 6[INDF0] ;
  1795. MOVWI 6[INDF1] ;
  1796. MOVIW 7[INDF0] ;
  1797. MOVWI 7[INDF1] ;
  1798. _CS_T_Check_For_Title: ;
  1799. BTFSC System_Status, P1_SERVICE_BIT ; If SERVICE is clear for both
  1800. BTFSS System_Status, P2_SERVICE_BIT ; players, then it's the start
  1801. GOTO $+2 ; of a game. Draw the title.
  1802. ADDFSR FSR0, 8 ;
  1803. ADDFSR FSR1, 8 ;
  1804. DECFSZ Temp1, F ;
  1805. GOTO _CS_T_Next_8_Bytes ;
  1806. ;-----------------------------------------------;
  1807. ;
  1808. _CS_T_Exit: ;
  1809. ;-----------------------------------------------;
  1810. ; 60us BLACK Line ;
  1811. ;-----------------------------------------------;
  1812. PAGESEL _BLACK_4us_SYNC_60us_LINE ;
  1813. CALL _BLACK_4us_SYNC_60us_LINE ;
  1814. PAGESEL $ ;
  1815. ;-----------------------------------------------;
  1816. #IF (_DISABLE_GAME_PROCESSING_ == TRUE) ;
  1817. GOTO _CS_B_Exit ;
  1818. #ENDIF ;
  1819. ;
  1820. _CS_Bottom: ;
  1821. ;-----------------------------------------------;
  1822. ; Set up the pointer to the video buffer ;
  1823. ;-----------------------------------------------;
  1824. MOVLW HIGH VIDEO_BUFFER_START ;
  1825. MOVWF FSR1H ;
  1826. MOVLW LOW VIDEO_BUFFER_START ;
  1827. ADDLW (NUM_LINES * 4) / 2 ;
  1828. MOVWF FSR1L ;
  1829. BTFSC STATUS, C ;
  1830. INCF FSR1H, F ;
  1831. ;-----------------------------------------------;
  1832. ;
  1833. ;-----------------------------------------------;
  1834. ; Set up the pointer to the title graphic ;
  1835. ;-----------------------------------------------;
  1836. MOVLW HIGH TITLE_GRAPHIC_START ;
  1837. MOVWF FSR0H ;
  1838. MOVLW LOW TITLE_GRAPHIC_START ;
  1839. _CS_B_Check_For_Title1: ;
  1840. BTFSC System_Status, P1_SERVICE_BIT ; If SERVICE is clear for both
  1841. BTFSS System_Status, P2_SERVICE_BIT ; players, then it's the start
  1842. GOTO $+2 ; of a game. Draw the title.
  1843. ADDLW (NUM_LINES * 4) / 2 ;
  1844. MOVWF FSR0L ;
  1845. BTFSC STATUS, C ;
  1846. INCF FSR0H, F ;
  1847. ;-----------------------------------------------;
  1848. ;
  1849. ;-----------------------------------------------;
  1850. ; Set up the number of bytes to transfer ;
  1851. ;-----------------------------------------------;
  1852. MOVLW ((TITLE_GRAPHIC_END - TITLE_GRAPHIC_START) / 2) / 8
  1853. MOVWF Temp1 ;
  1854. ;-----------------------------------------------;
  1855. ;
  1856. ;-----------------------------------------------;
  1857. ; Transfer the data from the title graphic to ;
  1858. ; the video buffer, 8 bytes at a time. Doing it ;
  1859. ; in groups of 8 in a loop, instead of 1 byte at;
  1860. ; a time in a loop, speeds up the transfer as ;
  1861. ; it cuts out a lot of the instruction cycles ;
  1862. ; for the looping mechanism. ;
  1863. ;-----------------------------------------------;
  1864. _CS_B_Next_8_Bytes: ;
  1865. MOVIW 0[INDF0] ;
  1866. MOVWI 0[INDF1] ;
  1867. MOVIW 1[INDF0] ;
  1868. MOVWI 1[INDF1] ;
  1869. MOVIW 2[INDF0] ;
  1870. MOVWI 2[INDF1] ;
  1871. MOVIW 3[INDF0] ;
  1872. MOVWI 3[INDF1] ;
  1873. MOVIW 4[INDF0] ;
  1874. MOVWI 4[INDF1] ;
  1875. MOVIW 5[INDF0] ;
  1876. MOVWI 5[INDF1] ;
  1877. MOVIW 6[INDF0] ;
  1878. MOVWI 6[INDF1] ;
  1879. MOVIW 7[INDF0] ;
  1880. MOVWI 7[INDF1] ;
  1881. _CS_B_Check_For_Title2: ;
  1882. BTFSC System_Status, P1_SERVICE_BIT ; If SERVICE is clear for both
  1883. BTFSS System_Status, P2_SERVICE_BIT ; players, then it's the start
  1884. GOTO $+2 ; of a game. Draw the title.
  1885. ADDFSR FSR0, 8 ;
  1886. ADDFSR FSR1, 8 ;
  1887. DECFSZ Temp1, F ;
  1888. GOTO _CS_B_Next_8_Bytes ;
  1889. ;-----------------------------------------------;
  1890. ;
  1891. _CS_B_Exit: ;
  1892. RETURN ;
  1893. ;---------------------------------------------------;
  1894.  
  1895. ;---------------------------------------------------;
  1896. _Banners: ;
  1897. ;---------------------------------------------------;
  1898. ; Note: This is a 60us line routine. It will ;
  1899. ; generate 11 60us data lines. First, 1 BLACK line ;
  1900. ; to space the banner from anything else. Then, the ;
  1901. ; 8 DATA lines of banner information. Finally, 1 ;
  1902. ; BLACK line for spacing and two WHITE lines. ;
  1903. ;---------------------------------------------------;
  1904. ;-----------------------------------------------;
  1905. BTFSC System_Status, BANNER_SELECT_BIT ;
  1906. GOTO _BB_Check_If_Time_To_Switch ;
  1907. ;-----------------------------------------------;
  1908. _TB_Check_If_Time_To_Switch: ;
  1909. MOVLW 120 ; / 60 frames = 2 secs
  1910. XORWF VSync_Count, W ;
  1911. BTFSS STATUS, Z ;
  1912. GOTO _TB_Do_Banner ;
  1913. ;-----------------------------------------------;
  1914. ;
  1915. ;-----------------------------------------------;
  1916. _TB_Switch_Banner: ;
  1917. INCF TB_Count, F ;
  1918. MOVLW MAX_TBANNERS ;
  1919. XORWF TB_Count, W ;
  1920. BTFSC STATUS, Z ;
  1921. CLRF TB_Count ;
  1922. ;
  1923. ;-----------------------------------------------;
  1924. _TB_Do_Banner: ;
  1925. MOVFW TB_Count ;
  1926. GOTO _B_Exit ;
  1927. ;-----------------------------------------------;
  1928. ;
  1929. ;-----------------------------------------------;
  1930. _BB_Check_If_Time_To_Switch: ;
  1931. ;-----------------------------------------------;
  1932. MOVLW 60 ;
  1933. XORWF VSync_Count, W ;
  1934. BTFSC STATUS, Z ;
  1935. GOTO _BB_Switch_Banner ;
  1936. MOVLW 120 ; / 60 frames = 2 secs
  1937. XORWF VSync_Count, W ;
  1938. BTFSS STATUS, Z ;
  1939. GOTO _BB_Do_Banner ;
  1940. ;-----------------------------------------------;
  1941. ;
  1942. CLRF VSync_Count ;
  1943. ;-----------------------------------------------;
  1944. _BB_Switch_Banner: ;
  1945. ;-----------------------------------------------;
  1946. INCF BB_Count, F ;
  1947. MOVLW MAX_BBANNERS ;
  1948. XORWF BB_Count, W ;
  1949. BTFSC STATUS, Z ;
  1950. CLRF BB_Count ;
  1951. ;-----------------------------------------------;
  1952. ;
  1953. ;-----------------------------------------------;
  1954. _BB_Do_Banner: ;
  1955. ;-----------------------------------------------;
  1956. MOVFW BB_Count ;
  1957. ADDLW MAX_TBANNERS ;
  1958. ;-----------------------------------------------;
  1959. ;
  1960. ;-----------------------------------------------;
  1961. _B_Exit: ;
  1962. GOTO _Banner_Select ;
  1963. ;---------------------------------------------------;
  1964.  
  1965. ;---------------------------------------------------;
  1966. _Banner_Select: ;
  1967. ;---------------------------------------------------;
  1968. BRW ;
  1969. GOTO _Banner_Copyright ;
  1970. GOTO _Banner_Software1 ;
  1971. GOTO _Banner_Software2 ;
  1972. GOTO _Banner_Option1 ;
  1973. GOTO _Banner_Option2 ;
  1974. GOTO _Banner_Author1 ;
  1975. GOTO _Banner_Author2 ;
  1976. GOTO _Banner_Email1 ;
  1977. GOTO _Banner_Email2 ;
  1978. GOTO _Banner_Website1 ;
  1979. GOTO _Banner_Website2 ;
  1980. GOTO _Banner_Website3 ;
  1981. GOTO _Banner_Website4 ;
  1982. GOTO _Banner_Website5 ;
  1983. ;---------------------------------------------------;
  1984. ;
  1985. ;---------------------------------------------------;
  1986. _Banner_Copyright: ;
  1987. ;---------------------------------------------------;
  1988. MOVLW LOW COPYRIGHT_BANNER_START ;
  1989. MOVWF FSR1L ;
  1990. MOVLW HIGH COPYRIGHT_BANNER_START ;
  1991. MOVWF FSR1H ;
  1992. ; MOVLW (COPYRIGHT_BANNER_END - COPYRIGHT_BANNER_START) / 8
  1993. PAGESEL _Draw_Banner ;
  1994. GOTO _Draw_Banner ;
  1995. ;---------------------------------------------------;
  1996.  
  1997. ;---------------------------------------------------;
  1998. _Banner_Software1: ;
  1999. ;---------------------------------------------------;
  2000. MOVLW LOW SOFTWARE1_BANNER_START ;
  2001. MOVWF FSR1L ;
  2002. MOVLW HIGH SOFTWARE1_BANNER_START ;
  2003. MOVWF FSR1H ;
  2004. ; MOVLW (SOFTWARE1_BANNER_END - SOFTWARE1_BANNER_START) / 8
  2005. PAGESEL _Draw_Banner ;
  2006. GOTO _Draw_Banner ;
  2007. ;---------------------------------------------------;
  2008.  
  2009. ;---------------------------------------------------;
  2010. _Banner_Software2: ;
  2011. ;---------------------------------------------------;
  2012. MOVLW LOW SOFTWARE2_BANNER_START ;
  2013. MOVWF FSR1L ;
  2014. MOVLW HIGH SOFTWARE2_BANNER_START ;
  2015. MOVWF FSR1H ;
  2016. ; MOVLW (SOFTWARE2_BANNER_END - SOFTWARE2_BANNER_START) / 8
  2017. PAGESEL _Draw_Banner ;
  2018. GOTO _Draw_Banner ;
  2019. ;---------------------------------------------------;
  2020.  
  2021. ;---------------------------------------------------;
  2022. _Banner_Author1: ;
  2023. ;---------------------------------------------------;
  2024. MOVLW LOW AUTHOR1_BANNER_START ;
  2025. MOVWF FSR1L ;
  2026. MOVLW HIGH AUTHOR1_BANNER_START ;
  2027. MOVWF FSR1H ;
  2028. ; MOVLW (AUTHOR1_BANNER_END - AUTHOR1_BANNER_START) / 8
  2029. PAGESEL _Draw_Banner ;
  2030. GOTO _Draw_Banner ;
  2031. ;---------------------------------------------------;
  2032.  
  2033. ;---------------------------------------------------;
  2034. _Banner_Author2: ;
  2035. ;---------------------------------------------------;
  2036. MOVLW LOW AUTHOR2_BANNER_START ;
  2037. MOVWF FSR1L ;
  2038. MOVLW HIGH AUTHOR2_BANNER_START ;
  2039. MOVWF FSR1H ;
  2040. ; MOVLW (AUTHOR2_BANNER_END - AUTHOR2_BANNER_START) / 8
  2041. PAGESEL _Draw_Banner ;
  2042. GOTO _Draw_Banner ;
  2043. ;---------------------------------------------------;
  2044.  
  2045. ;---------------------------------------------------;
  2046. _Banner_Email1: ;
  2047. MOVLW LOW EMAIL1_BANNER_START ;
  2048. MOVWF FSR1L ;
  2049. MOVLW HIGH EMAIL1_BANNER_START ;
  2050. MOVWF FSR1H ;
  2051. ; MOVLW (EMAIL1_BANNER_END - EMAIL1_BANNER_START) / 8
  2052. PAGESEL _Draw_Banner ;
  2053. GOTO _Draw_Banner ;
  2054. ;---------------------------------------------------;
  2055.  
  2056. ;---------------------------------------------------;
  2057. _Banner_Email2: ;
  2058. ;---------------------------------------------------;
  2059. MOVLW LOW EMAIL2_BANNER_START ;
  2060. MOVWF FSR1L ;
  2061. MOVLW HIGH EMAIL2_BANNER_START ;
  2062. MOVWF FSR1H ;
  2063. ; MOVLW (EMAIL2_BANNER_END - EMAIL2_BANNER_START) / 8
  2064. PAGESEL _Draw_Banner ;
  2065. GOTO _Draw_Banner ;
  2066. ;---------------------------------------------------;
  2067.  
  2068. ;---------------------------------------------------;
  2069. _Banner_Website1: ;
  2070. ;---------------------------------------------------;
  2071. MOVLW LOW WEBSITE1_BANNER_START ;
  2072. MOVWF FSR1L ;
  2073. MOVLW HIGH WEBSITE1_BANNER_START ;
  2074. MOVWF FSR1H ;
  2075. ; MOVLW (WEBSITE1_BANNER_END - WEBSITE1_BANNER_START) / 8
  2076. PAGESEL _Draw_Banner ;
  2077. GOTO _Draw_Banner ;
  2078. ;---------------------------------------------------;
  2079.  
  2080. ;---------------------------------------------------;
  2081. _Banner_Website2: ;
  2082. ;---------------------------------------------------;
  2083. MOVLW LOW WEBSITE2_BANNER_START ;
  2084. MOVWF FSR1L ;
  2085. MOVLW HIGH WEBSITE2_BANNER_START ;
  2086. MOVWF FSR1H ;
  2087. ; MOVLW (WEBSITE2_BANNER_END - WEBSITE2_BANNER_START) / 8
  2088. PAGESEL _Draw_Banner ;
  2089. GOTO _Draw_Banner ;
  2090. ;---------------------------------------------------;
  2091.  
  2092. ;---------------------------------------------------;
  2093. _Banner_Website3: ;
  2094. ;---------------------------------------------------;
  2095. MOVLW LOW WEBSITE3_BANNER_START ;
  2096. MOVWF FSR1L ;
  2097. MOVLW HIGH WEBSITE3_BANNER_START ;
  2098. MOVWF FSR1H ;
  2099. ; MOVLW (WEBSITE3_BANNER_END - WEBSITE3_BANNER_START) / 8
  2100. PAGESEL _Draw_Banner ;
  2101. GOTO _Draw_Banner ;
  2102. ;---------------------------------------------------;
  2103.  
  2104. ;---------------------------------------------------;
  2105. _Banner_Website4: ;
  2106. ;---------------------------------------------------;
  2107. MOVLW LOW WEBSITE4_BANNER_START ;
  2108. MOVWF FSR1L ;
  2109. MOVLW HIGH WEBSITE4_BANNER_START ;
  2110. MOVWF FSR1H ;
  2111. ; MOVLW (WEBSITE4_BANNER_END - WEBSITE4_BANNER_START) / 8
  2112. PAGESEL _Draw_Banner ;
  2113. GOTO _Draw_Banner ;
  2114. ;---------------------------------------------------;
  2115.  
  2116. ;---------------------------------------------------;
  2117. _Banner_Website5: ;
  2118. ;---------------------------------------------------;
  2119. MOVLW LOW WEBSITE5_BANNER_START ;
  2120. MOVWF FSR1L ;
  2121. MOVLW HIGH WEBSITE5_BANNER_START ;
  2122. MOVWF FSR1H ;
  2123. ; MOVLW (WEBSITE5_BANNER_END - WEBSITE5_BANNER_START) / 8
  2124. PAGESEL _Draw_Banner ;
  2125. GOTO _Draw_Banner ;
  2126. ;---------------------------------------------------;
  2127.  
  2128. ;---------------------------------------------------;
  2129. _Banner_Option1: ;
  2130. ;---------------------------------------------------;
  2131. MOVLW HIGH OPTION1_BANNER_START ;
  2132. MOVWF FSR1H ;
  2133. MOVLW LOW OPTION1_BANNER_START ;
  2134. MOVWF FSR1L ;
  2135. ; MOVLW (OPTION1_BANNER_END - OPTION1_BANNER_START) / 8
  2136. PAGESEL _Draw_Banner ;
  2137. GOTO _Draw_Banner ;
  2138. ;---------------------------------------------------;
  2139.  
  2140. ;---------------------------------------------------;
  2141. _Banner_Option2: ;
  2142. ;---------------------------------------------------;
  2143. MOVLW HIGH OPTION2_BANNER_START ;
  2144. MOVWF FSR1H ;
  2145. MOVLW LOW OPTION2_BANNER_START ;
  2146. MOVWF FSR1L ;
  2147. CLRW ;
  2148. BTFSC System_Status, P2_COMPUTER_BIT ;
  2149. MOVLW (OPTION2_BANNER_END - OPTION2_BANNER_START) / 2
  2150. ADDWF FSR1L, F ;
  2151. BTFSC STATUS, C ;
  2152. INCF FSR1H, F ;
  2153. ; MOVLW (OPTION2_BANNER_END - OPTION2_BANNER_START) / 16
  2154. PAGESEL _Draw_Banner ;
  2155. GOTO _Draw_Banner ;
  2156. ;---------------------------------------------------;
  2157.  
  2158. ;---------------------------------------------------;
  2159. USER_CODE_2 CODE H'800' ;
  2160. ;---------------------------------------------------;
  2161. ;---------------------------------------------------;
  2162. _Draw_Banner: ;
  2163. ;---------------------------------------------------;
  2164. ; 8 60us Data Lines Generation ;
  2165. ;-----------------------------------------------;
  2166. MOVLW 8 ;
  2167. MOVWF Line_Count ;
  2168. ;
  2169. _DB_Next_Line: ;
  2170. MOVLW 1 ;
  2171. MOVWF Repeat_Count ;
  2172. ;
  2173. _DB_Repeat_Line: ;
  2174. ;-----------------------------------------------;
  2175. ; 60us BLACK Line ;
  2176. ;-----------------------------------------------;
  2177. PAGESEL _BLACK_4us_SYNC_60us_LINE_BPorch ;
  2178. CALL _BLACK_4us_SYNC_60us_LINE_BPorch ;
  2179. PAGESEL $ ;
  2180. ;-----------------------------------------------;
  2181. ;
  2182. ;-----------------------------------------------;
  2183. ; Data Generation ;
  2184. ;-----------------------------------------------;
  2185. DO_BIT 7, 0 ;
  2186. DO_BIT 6, 0 ;
  2187. DO_BIT 5, 0 ;
  2188. DO_BIT 4, 0 ;
  2189. DO_BIT 3, 0 ;
  2190. DO_BIT 2, 0 ;
  2191. DO_BIT 1, 0 ;
  2192. DO_BIT 0, 0 ;
  2193. ;-----------------------------------------------;
  2194. DO_BIT 7, 0 ;
  2195. DO_BIT 6, 0 ;
  2196. DO_BIT 5, 0 ;
  2197. DO_BIT 4, 0 ;
  2198. DO_BIT 3, 0 ;
  2199. DO_BIT 2, 0 ;
  2200. DO_BIT 1, 0 ;
  2201. DO_BIT 0, 0 ;
  2202. ;-----------------------------------------------;
  2203. DO_BIT 7, 0 ;
  2204. DO_BIT 6, 0 ;
  2205. DO_BIT 5, 0 ;
  2206. DO_BIT 4, 0 ;
  2207. DO_BIT 3, 0 ;
  2208. DO_BIT 2, 0 ;
  2209. DO_BIT 1, 0 ;
  2210. DO_BIT 0, 0 ;
  2211. ;-----------------------------------------------;
  2212. DO_BIT 7, 0 ;
  2213. DO_BIT 6, 0 ;
  2214. DO_BIT 5, 0 ;
  2215. DO_BIT 4, 0 ;
  2216. DO_BIT 3, 0 ;
  2217. DO_BIT 2, 0 ;
  2218. DO_BIT 1, 0 ;
  2219. DO_BIT 0, 0 ;
  2220. ;-----------------------------------------------;
  2221. DO_BIT 7, 0 ;
  2222. DO_BIT 6, 0 ;
  2223. DO_BIT 5, 0 ;
  2224. DO_BIT 4, 0 ;
  2225. DO_BIT 3, 0 ;
  2226. DO_BIT 2, 0 ;
  2227. DO_BIT 1, 0 ;
  2228. DO_BIT 0, 0 ;
  2229. ;-----------------------------------------------;
  2230. DO_BIT 7, 0 ;
  2231. DO_BIT 6, 0 ;
  2232. DO_BIT 5, 0 ;
  2233. DO_BIT 4, 0 ;
  2234. DO_BIT 3, 0 ;
  2235. DO_BIT 2, 0 ;
  2236. DO_BIT 1, 0 ;
  2237. DO_BIT 0, 0 ;
  2238. ;-----------------------------------------------;
  2239. DO_BIT 7, 0 ;
  2240. DO_BIT 6, 0 ;
  2241. DO_BIT 5, 0 ;
  2242. DO_BIT 4, 0 ;
  2243. DO_BIT 3, 0 ;
  2244. DO_BIT 2, 0 ;
  2245. DO_BIT 1, 0 ;
  2246. DO_BIT 0, 0 ;
  2247. ;-----------------------------------------------;
  2248. DO_BIT 7, 0 ;
  2249. DO_BIT 6, 0 ;
  2250. DO_BIT 5, 0 ;
  2251. DO_BIT 4, 0 ;
  2252. DO_BIT 3, 0 ;
  2253. DO_BIT 2, 0 ;
  2254. DO_BIT 1, 0 ;
  2255. DO_BIT 0, 0 ;
  2256. ;-----------------------------------------------;
  2257. ;
  2258. ;-----------------------------------------------;
  2259. ; Xus Front Porch (Black Signal) Generation ;
  2260. ;-----------------------------------------------;
  2261. NOP
  2262. SET_DAC2BIT COLOR_BLACK ;
  2263. ;-----------------------------------------------;
  2264. ;
  2265. ;-----------------------------------------------;
  2266. ADDFSR FSR1, -8 ;
  2267. DECFSZ Repeat_Count, F ;
  2268. GOTO _DB_Repeat_Line ;
  2269. ;-----------------------------------------------;
  2270. ;
  2271. ;-----------------------------------------------;
  2272. ADDFSR FSR1, 8 ;
  2273. DECFSZ Line_Count, F ;
  2274. GOTO _DB_Next_Line ;
  2275. ;-----------------------------------------------;
  2276. ;
  2277. RETURN ;
  2278. ;---------------------------------------------------;
  2279.  
  2280. ;---------------------------------------------------;
  2281. SCORE_FONT_START: ;
  2282. ;---------------------------------------------------;
  2283. ; These are the bitmaps for the score characters;
  2284. ; 0-9, 4x5 pixels ;
  2285. ;-----------------------------------------------;
  2286. DT B'11101110', B'01000100', B'11101110', B'11101110', B'10101010', B'11101110', B'11101110', B'11101110', B'11101110', B'11101110'
  2287. DT B'10101010', B'11001100', B'00100010', B'00100010', B'10101010', B'10001000', B'10001000', B'00100010', B'10101010', B'10101010'
  2288. DT B'10101010', B'01000100', B'11101110', B'11101110', B'11101110', B'11101110', B'11101110', B'00100010', B'11101110', B'11101110'
  2289. DT B'10101010', B'01000100', B'10001000', B'00100010', B'00100010', B'00100010', B'10101010', B'00100010', B'10101010', B'00100010'
  2290. DT B'11101110', B'01000100', B'11101110', B'11101110', B'00100010', B'11101110', B'11101110', B'00100010', B'11101110', B'00100010'
  2291. ;-----------------------------------------------;
  2292. ; I'm trying to compress the character table by ;
  2293. ; 50%. So far - only the table, not the code ;
  2294. ;-----------------------------------------------;
  2295. ; DT B'11100100', B'11101110', B'10101110', B'11101110', B'11101110'
  2296. ; DT B'10101100', B'00100010', B'10101000', B'10000010', B'10101010'
  2297. ; DT B'10100100', B'11101110', B'11101110', B'11100010', B'11101110'
  2298. ; DT B'10100100', B'10000010', B'00100010', B'10100010', B'10100010'
  2299. ; DT B'11100100', B'11101110', B'00101110', B'11100010', B'11100010'
  2300. ;---------------------------------------------------;
  2301. SCORE_FONT_END: ;
  2302. ;---------------------------------------------------;
  2303.  
  2304. ;---------------------------------------------------;
  2305. SERVICE_ARROW_START: ;
  2306. ;---------------------------------------------------;
  2307. ; These are the bitmaps for the 'SERVICE' arrow ;
  2308. ; that shows up next to a score. ;
  2309. ;-----------------------------------------------;
  2310. DT B'00011000' ;
  2311. DT B'00100100' ;
  2312. DT B'01000010' ;
  2313. DT B'00100100' ;
  2314. DT B'00011000' ;
  2315. ;---------------------------------------------------;
  2316. SERVICE_ARROW_END: ;
  2317. ;---------------------------------------------------;
  2318.  
  2319. ;---------------------------------------------------;
  2320. ; Title Graphic Scan Line Data ;
  2321. ;---------------------------------------------------;
  2322. TITLE_GRAPHIC_START: ;
  2323. ;---------------------------------------------------;
  2324. ; The first 6x4 lines should be 0 so that the ;
  2325. ; title graphic does not merge with the scores, ;
  2326. ; and for the screen to clear the title properly;
  2327. ;-----------------------------------------------;
  2328. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2329. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2330. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2331. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2332. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2333. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2334. ;-----------------------------------------------;
  2335. ; The next 42x4 lines contain the title graphic ;
  2336. ;-----------------------------------------------;
  2337. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2338. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2339. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2340. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2341. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2342. DT B'00001111', B'00000000', B'01110000', B'00000000'
  2343. DT B'00001111', B'10000000', B'11111000', B'00000000'
  2344. DT B'00001111', B'10000000', B'11111000', B'00000000'
  2345. DT B'00001000', B'10000000', B'10001000', B'00000000'
  2346. DT B'00001000', B'10000000', B'10001000', B'00000000'
  2347. DT B'00001000', B'10011100', B'10001001', B'11000000'
  2348. DT B'00001111', B'10111110', B'10001011', B'11100000'
  2349. DT B'00001111', B'10111110', B'10001011', B'11100000'
  2350. DT B'00001111', B'00100010', B'10001010', B'00100000'
  2351. DT B'00001000', B'00100010', B'10001010', B'00000000'
  2352. DT B'00001000', B'00100010', B'10001010', B'00000000'
  2353. DT B'00001000', B'00100010', B'10001010', B'01100000'
  2354. DT B'00001000', B'00100010', B'10001010', B'01100000'
  2355. DT B'00001000', B'00100010', B'10001010', B'01100000'
  2356. DT B'00001000', B'00100010', B'10001010', B'00100000'
  2357. DT B'00000000', B'00100010', B'00000010', B'00100000'
  2358. DT B'00000000', B'00100010', B'00000010', B'00100000'
  2359. DT B'00000000', B'00111110', B'00000011', B'11100000'
  2360. DT B'00000000', B'00111110', B'00000011', B'11100000'
  2361. DT B'00000000', B'00011100', B'00000001', B'11000000'
  2362. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2363. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2364. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2365. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2366. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2367. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2368. DT B'00011101', B'11011100', B'01110101', B'01110000'
  2369. DT B'00010001', B'01010100', B'00100101', B'01000000'
  2370. DT B'00011001', B'01011000', B'00100111', B'01100000'
  2371. DT B'00010001', B'01010100', B'00100101', B'01000000'
  2372. DT B'00010001', B'11010100', B'00100101', B'01110000'
  2373. DT B'00000000', B'00000000', B'00000000', B'00000000'
  2374. DT B'00001011', B'10111010', B'11101010', B'11100000'
  2375. DT B'00001000', B'10100010', B'10101010', B'10100000'
  2376. DT B'00001011', B'10110010', B'11101110', B'10100000'
  2377. DT B'00001010', B'00100010', B'10100010', B'10100000'
  2378. DT B'00001011', B'10100010', B'11100010', B'11100000'
  2379. ;---------------------------------------------------;
  2380. TITLE_GRAPHIC_END: ;
  2381. ;---------------------------------------------------;
  2382.  
  2383. ;---------------------------------------------------;
  2384. ; COPYRIGHT BANNER Scan Line Data ;
  2385. ;---------------------------------------------------;
  2386. COPYRIGHT_BANNER_START: ;
  2387. ;---------------------------------------------------;
  2388. ; this is the bitmap for the COPYRIGHT info ;
  2389. ; "PONG (C)2012 DTI" ;
  2390. ; 64x8 pixels ;
  2391. ;-----------------------------------------------;
  2392. DT B'00000111', B'00100010', B'00110000', B'10010010', B'01110011', B'00101110', B'00110011', B'10100000'
  2393. DT B'00000111', B'01110101', B'01110001', B'10111011', B'01110111', B'01101110', B'00111011', B'10100000'
  2394. DT B'00000101', B'01010101', B'01000001', B'00101001', B'00010101', B'01100010', B'00101001', B'00100000'
  2395. DT B'00000111', B'01010101', B'01000001', B'00100001', B'01110101', B'00101110', B'00101001', B'00100000'
  2396. DT B'00000110', B'01010101', B'01010001', B'00100001', B'01110101', B'00101110', B'00101001', B'00100000'
  2397. DT B'00000100', B'01010101', B'01010001', B'00101001', B'01000101', B'00101000', B'00101001', B'00100000'
  2398. DT B'00000100', B'01110101', B'01110001', B'10111011', B'01110111', B'00101110', B'00111001', B'00100000'
  2399. DT B'00000100', B'00100101', B'00100000', B'10010010', B'01110010', B'00101110', B'00110001', B'00100000'
  2400. ;---------------------------------------------------;
  2401. COPYRIGHT_BANNER_END: ;
  2402. ;---------------------------------------------------;
  2403. SOFTWARE1_BANNER_START: ;
  2404. ;---------------------------------------------------;
  2405. ; this is the bitmap for the VERSION information;
  2406. ; Part 1 - "SOFTWARE VERSION:" ;
  2407. ; 64x8 pixels ;
  2408. ;-----------------------------------------------;
  2409. DT B'01110010', B'01110111', B'01010100', B'10011001', B'11001010', B'11101100', B'11101001', B'00010000'
  2410. DT B'01110111', B'01110111', B'01010101', B'11011101', B'11001010', B'11101110', B'11101011', B'10111010'
  2411. DT B'01000101', B'01000010', B'01010101', B'01010101', B'00001010', B'10001010', B'10001010', B'10101010'
  2412. DT B'01110101', B'01100010', B'01010101', B'11011001', B'10001010', B'11001100', B'11101010', B'10101000'
  2413. DT B'01110101', B'01100010', B'01010101', B'11011101', B'10001010', B'11001110', B'11101010', B'10101000'
  2414. DT B'00010101', B'01000010', B'01010101', B'01010101', B'00001010', B'10001010', B'00101010', B'10101010'
  2415. DT B'01110111', B'01000010', B'01111101', B'01010101', B'11001110', B'11101010', B'11101011', B'10101010'
  2416. DT B'01110010', B'01000010', B'00101001', B'01010101', B'11000100', B'11101010', B'11101001', B'00101000'
  2417. ;---------------------------------------------------;
  2418. SOFTWARE1_BANNER_END: ;
  2419. ;---------------------------------------------------;
  2420. SOFTWARE2_BANNER_START: ;
  2421. ;---------------------------------------------------;
  2422. ; this is the bitmap for the VERSION information;
  2423. ; Part 2 - " V4.04 " ;
  2424. ; 64x8 pixels ;
  2425. ;-----------------------------------------------;
  2426. DT B'00000000', B'00000000', B'00000001', B'01010100', B'00100101', B'00000000', B'00000000', B'00000000'
  2427. DT B'00000000', B'00000000', B'00000001', B'01010100', B'01110101', B'00000000', B'00000000', B'00000000'
  2428. DT B'00000000', B'00000000', B'00000001', B'01010100', B'01010101', B'00000000', B'00000000', B'00000000'
  2429. DT B'00000000', B'00000000', B'00000001', B'01011100', B'01010111', B'00000000', B'00000000', B'00000000'
  2430. DT B'00000000', B'00000000', B'00000001', B'01011100', B'01010111', B'00000000', B'00000000', B'00000000'
  2431. DT B'00000000', B'00000000', B'00000001', B'01000100', B'01010001', B'00000000', B'00000000', B'00000000'
  2432. DT B'00000000', B'00000000', B'00000001', B'11000101', B'01110001', B'00000000', B'00000000', B'00000000'
  2433. DT B'00000000', B'00000000', B'00000000', B'10000101', B'00100001', B'00000000', B'00000000', B'00000000'
  2434. ;---------------------------------------------------;
  2435. SOFTWARE2_BANNER_END: ;
  2436. ;---------------------------------------------------;
  2437. AUTHOR1_BANNER_START: ;
  2438. ;---------------------------------------------------;
  2439. ; this is the bitmap for the AUTHOR information ;
  2440. ; Part 1 - " WRITTEN BY: " ;
  2441. ; 64x8 pixels ;
  2442. ;-----------------------------------------------;
  2443. DT B'00000000', B'00000101', B'01011001', B'01110111', B'01110010', B'00110010', B'10000000', B'00000000'
  2444. DT B'00000000', B'00000101', B'01011101', B'01110111', B'01110111', B'00111010', B'10100000', B'00000000'
  2445. DT B'00000000', B'00000101', B'01010101', B'00100010', B'01000101', B'00101010', B'10100000', B'00000000'
  2446. DT B'00000000', B'00000101', B'01011001', B'00100010', B'01100101', B'00110011', B'10000000', B'00000000'
  2447. DT B'00000000', B'00000101', B'01011101', B'00100010', B'01100101', B'00111011', B'10000000', B'00000000'
  2448. DT B'00000000', B'00000101', B'01010101', B'00100010', B'01000101', B'00101001', B'00100000', B'00000000'
  2449. DT B'00000000', B'00000111', B'11010101', B'00100010', B'01110101', B'00111001', B'00100000', B'00000000'
  2450. DT B'00000000', B'00000010', B'10010101', B'00100010', B'01110101', B'00110001', B'00000000', B'00000000'
  2451. ;---------------------------------------------------;
  2452. AUTHOR1_BANNER_END: ;
  2453. ;---------------------------------------------------;
  2454. AUTHOR2_BANNER_START: ;
  2455. ;---------------------------------------------------;
  2456. ; this is the bitmap for the AUTHOR information ;
  2457. ; Part 2 - "TIMOTHY S. CARLSON" ;
  2458. ; 64x8 pixels ;
  2459. ;-----------------------------------------------;
  2460. DT B'01110100', B'10100010', B'01110101', B'01010011', B'10000010', B'00100110', B'01001110', B'01000100'
  2461. DT B'01110101', B'11110111', B'01110101', B'01010011', B'10000111', B'01110111', B'01001110', B'11101110'
  2462. DT B'00100101', B'01010101', B'00100101', B'01010010', B'00000101', B'01010101', B'01001000', B'10101010'
  2463. DT B'00100101', B'01010101', B'00100111', B'01110011', B'10000100', B'01110110', B'01001110', B'10101010'
  2464. DT B'00100101', B'01010101', B'00100111', B'00100011', B'10000100', B'01110111', B'01001110', B'10101010'
  2465. DT B'00100101', B'01010101', B'00100101', B'00100000', B'10000101', B'01010101', B'01000010', B'10101010'
  2466. DT B'00100101', B'01010111', B'00100101', B'00100011', B'10100111', B'01010101', B'01101110', B'11101010'
  2467. DT B'00100101', B'01010010', B'00100101', B'00100011', B'10100010', B'01010101', B'01101110', B'01001010'
  2468. ;---------------------------------------------------;
  2469. AUTHOR2_BANNER_END: ;
  2470. ;---------------------------------------------------;
  2471. EMAIL1_BANNER_START: ;
  2472. ;---------------------------------------------------;
  2473. ; this is the bitmap for the EMAIL information ;
  2474. ; Part 1 - " EMAIL: " ;
  2475. ; 64x8 pixels ;
  2476. ;-----------------------------------------------;
  2477. DT B'00000000', B'00000000', B'00000011', B'10010100', B'01001010', B'00000000', B'00000000', B'00000000'
  2478. DT B'00000000', B'00000000', B'00000011', B'10111110', B'11101010', B'01000000', B'00000000', B'00000000'
  2479. DT B'00000000', B'00000000', B'00000010', B'00101010', B'10101010', B'01000000', B'00000000', B'00000000'
  2480. DT B'00000000', B'00000000', B'00000011', B'00101010', B'11101010', B'00000000', B'00000000', B'00000000'
  2481. DT B'00000000', B'00000000', B'00000011', B'00101010', B'11101010', B'00000000', B'00000000', B'00000000'
  2482. DT B'00000000', B'00000000', B'00000010', B'00101010', B'10101010', B'01000000', B'00000000', B'00000000'
  2483. DT B'00000000', B'00000000', B'00000011', B'10101010', B'10101011', B'01000000', B'00000000', B'00000000'
  2484. DT B'00000000', B'00000000', B'00000011', B'10101010', B'10101011', B'00000000', B'00000000', B'00000000'
  2485. ;---------------------------------------------------;
  2486. EMAIL1_BANNER_END: ;
  2487. ;---------------------------------------------------;
  2488. EMAIL2_BANNER_START: ;
  2489. ;---------------------------------------------------;
  2490. ; this is the bitmap for the EMAIL information ;
  2491. ; Part 2 - "TSCARLSON AT GMAIL" ;
  2492. ; 64x8 pixels ;
  2493. ;-----------------------------------------------;
  2494. DT B'01110111', B'00100010', B'01100100', B'11100100', B'01000010', B'11100011', B'00101000', B'10010100'
  2495. DT B'01110111', B'01110111', B'01110100', B'11101110', B'11100111', B'11100111', B'01111101', B'11010100'
  2496. DT B'00100100', B'01010101', B'01010100', B'10001010', B'10100101', B'01000100', B'01010101', B'01010100'
  2497. DT B'00100111', B'01000111', B'01100100', B'11101010', B'10100111', B'01000101', B'01010101', B'11010100'
  2498. DT B'00100111', B'01000111', B'01110100', B'11101010', B'10100111', B'01000101', B'01010101', B'11010100'
  2499. DT B'00100001', B'01010101', B'01010100', B'00101010', B'10100101', B'01000101', B'01010101', B'01010100'
  2500. DT B'00100111', B'01110101', B'01010100', B'11101110', B'10100101', B'01000111', B'01010101', B'01010110'
  2501. DT B'00100111', B'00100101', B'01010110', B'11100100', B'10100101', B'01000010', B'01010101', B'01010110'
  2502. ;---------------------------------------------------;
  2503. EMAIL2_BANNER_END: ;
  2504. ;---------------------------------------------------;
  2505. WEBSITE1_BANNER_START: ;
  2506. ;---------------------------------------------------;
  2507. ; this is the bitmap for the WEBSITE information;
  2508. ; Part 1 - " WEBSITE: " ;
  2509. ; 64x8 pixels ;
  2510. ;-----------------------------------------------;
  2511. DT B'00000000', B'00000000', B'01010101', B'11011001', B'11010111', B'01110000', B'00000000', B'00000000'
  2512. DT B'00000000', B'00000000', B'01010101', B'11011101', B'11010111', B'01110100', B'00000000', B'00000000'
  2513. DT B'00000000', B'00000000', B'01010101', B'00010101', B'00010010', B'01000100', B'00000000', B'00000000'
  2514. DT B'00000000', B'00000000', B'01010101', B'11011001', B'11010010', B'01100000', B'00000000', B'00000000'
  2515. DT B'00000000', B'00000000', B'01010101', B'11011101', B'11010010', B'01100000', B'00000000', B'00000000'
  2516. DT B'00000000', B'00000000', B'01010101', B'00010100', B'01010010', B'01000100', B'00000000', B'00000000'
  2517. DT B'00000000', B'00000000', B'01111101', B'11011101', B'11010010', B'01110100', B'00000000', B'00000000'
  2518. DT B'00000000', B'00000000', B'00101001', B'11011001', B'11010010', B'01110000', B'00000000', B'00000000'
  2519. ;---------------------------------------------------;
  2520. WEBSITE1_BANNER_END: ;
  2521. ;---------------------------------------------------;
  2522. WEBSITE2_BANNER_START: ;
  2523. ;---------------------------------------------------;
  2524. ; this is the bitmap for the WEBSITE information;
  2525. ; Part 2 - " WWW. " ;
  2526. ; 64x8 pixels ;
  2527. ;-----------------------------------------------;
  2528. DT B'00000000', B'00000000', B'00000001', B'01010101', B'01010101', B'00000000', B'00000000', B'00000000'
  2529. DT B'00000000', B'00000000', B'00000001', B'01010101', B'01010101', B'00000000', B'00000000', B'00000000'
  2530. DT B'00000000', B'00000000', B'00000001', B'01010101', B'01010101', B'00000000', B'00000000', B'00000000'
  2531. DT B'00000000', B'00000000', B'00000001', B'01010101', B'01010101', B'00000000', B'00000000', B'00000000'
  2532. DT B'00000000', B'00000000', B'00000001', B'01010101', B'01010101', B'00000000', B'00000000', B'00000000'
  2533. DT B'00000000', B'00000000', B'00000001', B'01010101', B'01010101', B'00000000', B'00000000', B'00000000'
  2534. DT B'00000000', B'00000000', B'00000001', B'11110111', B'11011111', B'01000000', B'00000000', B'00000000'
  2535. DT B'00000000', B'00000000', B'00000000', B'10100010', B'10001010', B'01000000', B'00000000', B'00000000'
  2536. ;---------------------------------------------------;
  2537. WEBSITE2_BANNER_END: ;
  2538. ;---------------------------------------------------;
  2539. WEBSITE3_BANNER_START: ;
  2540. ;---------------------------------------------------;
  2541. ; this is the bitmap for the WEBSITE information;
  2542. ; Part 3 - " DYSFUNCTIONAL " ;
  2543. ; 64x8 pixels ;
  2544. ;-----------------------------------------------;
  2545. DT B'00000000', B'11001010', B'11101110', B'10100100', B'01001110', B'10010001', B'00010010', B'00000000'
  2546. DT B'00000000', B'11101010', B'11101110', B'10101110', B'11101110', B'10111011', B'10111010', B'00000000'
  2547. DT B'00000000', B'10101010', B'10001000', B'10101010', B'10100100', B'10101010', B'10101010', B'00000000'
  2548. DT B'00000000', B'10101110', B'11101100', B'10101010', B'10000100', B'10101010', B'10111010', B'00000000'
  2549. DT B'00000000', B'10101110', B'11101100', B'10101010', B'10000100', B'10101010', B'10111010', B'00000000'
  2550. DT B'00000000', B'10100100', B'00101000', B'10101010', B'10100100', B'10101010', B'10101010', B'00000000'
  2551. DT B'00000000', B'11100100', B'11101000', B'11101010', B'11100100', B'10111010', B'10101011', B'00000000'
  2552. DT B'00000000', B'11000100', B'11101000', B'01001010', B'01000100', B'10010010', B'10101011', B'00000000'
  2553. ;---------------------------------------------------;
  2554. WEBSITE3_BANNER_END: ;
  2555. ;---------------------------------------------------;
  2556. WEBSITE4_BANNER_START: ;
  2557. ;---------------------------------------------------;
  2558. ; this is the bitmap for the WEBSITE information;
  2559. ; Part 4 - " TECHNOLOGIES " ;
  2560. ; 64x8 pixels ;
  2561. ;-----------------------------------------------;
  2562. DT B'00000000', B'01110111', B'00100101', B'00100010', B'01000100', B'01101011', B'10111000', B'00000000'
  2563. DT B'00000000', B'01110111', B'01110101', B'01110111', B'01001110', B'11101011', B'10111000', B'00000000'
  2564. DT B'00000000', B'00100100', B'01010101', B'01010101', B'01001010', B'10001010', B'00100000', B'00000000'
  2565. DT B'00000000', B'00100110', B'01000111', B'01010101', B'01001010', B'10001011', B'00111000', B'00000000'
  2566. DT B'00000000', B'00100110', B'01000111', B'01010101', B'01001010', B'10101011', B'00111000', B'00000000'
  2567. DT B'00000000', B'00100100', B'01010101', B'01010101', B'01001010', B'10101010', B'00001000', B'00000000'
  2568. DT B'00000000', B'00100111', B'01110101', B'01010111', B'01101110', B'11101011', B'10111000', B'00000000'
  2569. DT B'00000000', B'00100111', B'00100101', B'01010010', B'01100100', B'01001011', B'10111000', B'00000000'
  2570. ;---------------------------------------------------;
  2571. WEBSITE4_BANNER_END: ;
  2572. ;---------------------------------------------------;
  2573. WEBSITE5_BANNER_START: ;
  2574. ;---------------------------------------------------;
  2575. ; this is the bitmap for the WEBSITE information;
  2576. ; Part 5 - " .COM " ;
  2577. ; 64x8 pixels ;
  2578. ;-----------------------------------------------;
  2579. DT B'00000000', B'00000000', B'00000000', B'00010001', B'00010100', B'00000000', B'00000000', B'00000000'
  2580. DT B'00000000', B'00000000', B'00000000', B'00111011', B'10111110', B'00000000', B'00000000', B'00000000'
  2581. DT B'00000000', B'00000000', B'00000000', B'00101010', B'10101010', B'00000000', B'00000000', B'00000000'
  2582. DT B'00000000', B'00000000', B'00000000', B'00100010', B'10101010', B'00000000', B'00000000', B'00000000'
  2583. DT B'00000000', B'00000000', B'00000000', B'00100010', B'10101010', B'00000000', B'00000000', B'00000000'
  2584. DT B'00000000', B'00000000', B'00000000', B'00101010', B'10101010', B'00000000', B'00000000', B'00000000'
  2585. DT B'00000000', B'00000000', B'00000000', B'10111011', B'10101010', B'00000000', B'00000000', B'00000000'
  2586. DT B'00000000', B'00000000', B'00000000', B'10010001', B'00101010', B'00000000', B'00000000', B'00000000'
  2587. ;---------------------------------------------------;
  2588. WEBSITE5_BANNER_END: ;
  2589. ;---------------------------------------------------;
  2590. OPTION1_BANNER_START: ;
  2591. ;---------------------------------------------------;
  2592. ; this is the bitmap for the OPTION information ;
  2593. ; Part 1 - " GAMEPLAY OPTIONS:" ;
  2594. ; 64x8 pixels ;
  2595. ;-----------------------------------------------;
  2596. DT B'00110010', B'00101001', B'11011001', B'00010010', B'10001001', B'10011101', B'00100010', B'01110000'
  2597. DT B'01110111', B'01111101', B'11011101', B'00111010', B'10011101', B'11011101', B'01110111', B'01110100'
  2598. DT B'01000101', B'01010101', B'00010101', B'00101010', B'10010101', B'01001001', B'01010101', B'01000100'
  2599. DT B'01010111', B'01010101', B'10011101', B'00111011', B'10010101', B'11001001', B'01010101', B'01110000'
  2600. DT B'01010111', B'01010101', B'10011001', B'00111011', B'10010101', B'10001001', B'01010101', B'01110000'
  2601. DT B'01010101', B'01010101', B'00010001', B'00101001', B'00010101', B'00001001', B'01010101', B'00010100'
  2602. DT B'01110101', B'01010101', B'11010001', B'10101001', B'00011101', B'00001001', B'01110101', B'01110100'
  2603. DT B'00100101', B'01010101', B'11010001', B'10101001', B'00001001', B'00001001', B'00100101', B'01110000'
  2604. ;---------------------------------------------------;
  2605. OPTION1_BANNER_END: ;
  2606. ;---------------------------------------------------;
  2607. OPTION2_BANNER_START: ;
  2608. ;---------------------------------------------------;
  2609. ; this is the bitmap for the OPTION information ;
  2610. ; Part 2 - Option 1 - " HUMAN VS. HUMAN " ;
  2611. ; 64x8 pixels ;
  2612. ;-----------------------------------------------;
  2613. DT B'00001010', B'10100101', B'00010001', B'00010101', B'11000010', B'10101001', B'01000100', B'01000000'
  2614. DT B'00001010', B'10101111', B'10111011', B'10010101', B'11000010', B'10101011', B'11101110', B'11100000'
  2615. DT B'00001010', B'10101010', B'10101010', B'10010101', B'00000010', B'10101010', B'10101010', B'10100000'
  2616. DT B'00001110', B'10101010', B'10111010', B'10010101', B'11000011', B'10101010', B'10101110', B'10100000'
  2617. DT B'00001110', B'10101010', B'10111010', B'10010101', B'11000011', B'10101010', B'10101110', B'10100000'
  2618. DT B'00001010', B'10101010', B'10101010', B'10010100', B'01000010', B'10101010', B'10101010', B'10100000'
  2619. DT B'00001010', B'11101010', B'10101010', B'10011101', B'11010010', B'10111010', B'10101010', B'10100000'
  2620. DT B'00001010', B'11101010', B'10101010', B'10001001', B'11010010', B'10111010', B'10101010', B'10100000'
  2621. ;-----------------------------------------------;
  2622. ; this is the bitmap for the OPTION information ;
  2623. ; Part 2 - Option 2 - "HUMAN VS. 12F1840 " ;
  2624. ; 64x8 pixels ;
  2625. ;-----------------------------------------------;
  2626. DT B'00001010', B'10100101', B'00010001', B'00010101', B'11000010', B'11101110', B'10010010', B'10010000'
  2627. DT B'00001010', B'10101111', B'10111011', B'10010101', B'11000010', B'11101110', B'10111010', B'10111000'
  2628. DT B'00001010', B'10101010', B'10101010', B'10010101', B'00000010', B'00101000', B'10101010', B'10101000'
  2629. DT B'00001110', B'10101010', B'10111010', B'10010101', B'11000010', B'11101100', B'10010011', B'10101000'
  2630. DT B'00001110', B'10101010', B'10111010', B'10010101', B'11000010', B'11101100', B'10111011', B'10101000'
  2631. DT B'00001010', B'10101010', B'10101010', B'10010100', B'01000010', B'10001000', B'10101000', B'10101000'
  2632. DT B'00001010', B'11101010', B'10101010', B'10011101', B'11010010', B'11101000', B'10111000', B'10111000'
  2633. DT B'00001010', B'11101010', B'10101010', B'10001001', B'11010010', B'11101000', B'10010000', B'10010000'
  2634. ;---------------------------------------------------;
  2635. OPTION2_BANNER_END: ;
  2636. ;---------------------------------------------------;
  2637.  
  2638. ;---------------------------------------------------;
  2639. ;---------------------------------------------------;
  2640. END ;
  2641. ;---------------------------------------------------;
  2642. ;---------------------------------------------------;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement