Geekboy

C:\Documents and Settings\JOHN\Desktop\CaDan-2011-08-15\CaDan2\p1\lib_scrn.z80 - Notepad++

Oct 22nd, 2011
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;LCD driving routines for all-purpose goodness. Includes very specific
  2. ;HUD display routines, since they're drawn directly to the LCD.
  3. ;
  4. _drawlcd.z80:
  5.  
  6. ;Cycle 1 menu mode LCD update
  7. FullScreenLCD1:
  8.  ld de,$55AA
  9.  jp FSLCDCO
  10. ;Cycle 2 menu mode LCD update
  11. FullScreenLCD2:
  12.  ld de,$AA55
  13. ;
  14. FSLCDCO:
  15.  ld (itemp1),sp
  16.  ld hl,$8400+((12*64)-1)
  17.  ld c,$20
  18. FSLCDLP:
  19.  ld b,32          ;62
  20.  ld a,c           ;66
  21.  out ($10),a      ;11
  22.  ld sp,-(12*64)+1 ;21
  23.  add hl,sp        ;32
  24.  nop
  25. FSLCDIN:          ;
  26.  ld a,(hl)        ;  .42
  27.  and e            ;  .46
  28.  res 2,h          ;  .54
  29.  or (hl)          ;  .61
  30.  set 2,h          ;  .69
  31.  out ($11),a      ;11
  32.  ld sp,12         ;21
  33.  add hl,sp        ;32
  34.  ld a,(hl)        ;39
  35.  and d            ;43
  36.  res 2,h          ;51
  37.  or (hl)          ;58
  38.  set 2,h          ;66
  39.  out ($11),a      ;11
  40.  add hl,sp        ;22
  41.  djnz FSLCDIN     ;35*
  42.  inc c            ;34
  43.  ld a,c           ;38
  44.  cp $20+12        ;45
  45.  jp nz,FSLCDLP    ;55
  46.  ld sp,(itemp1)   ;75
  47.  ret              ;86
  48.  
  49. ;
  50. ;
  51. ;
  52. ;
  53. GameScreenLCD1:
  54.  ld a,$80
  55.  out (10h),a        ;11
  56.  ld a,$20           ;7  28
  57.  ld c,a             ;4  32
  58.  ld hl,$81FF        ;10 42
  59.  nop                ;4  46
  60. GFC2L1:             ;++ ++
  61.  ld de,-511    ;10
  62.  add hl,de     ;11
  63.  out (10h),a   ;11 11
  64.  ld b,32       ;07 18
  65.  ld de,8       ;10 21
  66.  nop           ;04 25 waste
  67. GFC2L2:        ;
  68.  set 2,h       ;08 .  32
  69.  ld a,(hl)     ;07 .  39
  70.  res 2,h       ;08 .  47
  71.  and %01010101 ;07 .  54
  72.  or (hl)       ;07 .  61
  73.  nop           ;04 66 65 waste
  74.  out (11h),a   ;11 11
  75.  set 3,L       ;08 19  ;cheapass addition because address is page aligned
  76.  set 2,h       ;08 27
  77.  ld a,(hl)     ;07 34
  78.  res 2,h       ;08 42
  79.  and %10101010 ;07 49
  80.  or (hl)       ;07 56
  81.  add hl,de     ;11 67
  82.  out (11h),a   ;11 11
  83.  djnz GFC2L2   ;13 24/19
  84.  inc c         ;4  23
  85.  ld a,c        ;4  27
  86.  bit 3,a       ;8  35
  87.  jp z,GFC2L1   ;10 45
  88.  ret
  89. ;
  90. GameScreenLCD2:
  91.  ld a,$20
  92.  ld c,a
  93.  ld hl,$81FF
  94. GFC3L1:
  95.  ld de,-511    ;10
  96.  add hl,de     ;11
  97.  out (10h),a   ;11 11
  98.  ld b,32       ;07 18
  99.  ld de,8       ;10 21
  100.  nop           ;04 25 waste
  101. GFC3L2:        ;
  102.  set 2,h       ;08 .  32
  103.  ld a,(hl)     ;07 .  39
  104.  res 2,h       ;08 .  47
  105.  and %10101010 ;07 .  54
  106.  or (hl)       ;07 .  61
  107.  nop           ;04 66 65 waste
  108.  out (11h),a   ;11 11
  109.  set 3,L       ;08 19  ;cheapass addition because address is page aligned
  110.  set 2,h       ;08 27
  111.  ld a,(hl)     ;07 34
  112.  res 2,h       ;08 42
  113.  and %01010101 ;07 49
  114.  or (hl)       ;07 56
  115.  add hl,de     ;11 67
  116.  out (11h),a   ;11 11
  117.  djnz GFC3L2   ;13 24/19
  118.  inc c         ;4  23
  119.  ld a,c        ;4  27
  120.  bit 3,a       ;8  35
  121.  jp z,GFC3L1   ;10 45
  122.  ret
  123. ;-----------------------------------------------------------------------------
  124. ;-----------------------------------------------------------------------------
  125. ;-----------------------------------------------------------------------------
  126. ;Routines after here should relate to the scoreboard routine. Sure, they take
  127. ;up a ton of space and have much stuff hardcoded in, but they're fast and
  128. ;so totally worth it. The right 1/3 of the screen isn't buffered anywhere. Nor
  129. ;will it ever be.
  130. DrawScoreboard:
  131. ;######################################### FAR LEFT SIDE (LIVES, BOMBS, POWER)
  132.  ld a,(keyread)
  133.  bit 4,a  ;Y= KEY
  134.  jr nz,$+6
  135.  pop hl ;debugging. Removing stack location
  136.  jp ExitBattleEngine
  137.  ld a,255
  138.  ld (charlives),a  ;debugging, maxing out lives for display routine
  139.  ld (charcurbombs),a
  140. ;##### END DEBUGGING SECTION###
  141.  ld (itemp4),sp  ;safety is a relative thing. Hope EI wasn't executed.
  142.  
  143.  xor a
  144.  dec a
  145.  ld ($8103),a  ;bar.
  146.  
  147.  xor a
  148.  ld c,a          ;safety timing. Also want spare zero to keep with other time.
  149.  inc c           ;..  Incrementing for eventual decrement below for timing.
  150.  ld a,$80        ;..  @@ Setting cursor row to top of the screen. For safety.
  151.  out ($10),a     ;11  >>> INTERLACING KEYBOARD READING ROUTINE WITH SCREENDRAW
  152.  ld a,$FF        ;18
  153.  inc hl \ dec hl ;30  Timed for safety.
  154.  out (1),a       ;41  D-pad and del/mode/2nd/y= keygroups
  155.  ld a,$BE        ;48   7    6   5   4  3   2    1    0
  156.  out (1),a       ;59  del mode 2nd y= up right left down
  157.  ld a,$20+11     ;66  @@ Far right column to load
  158.  out ($10),a     ;11
  159.  in a,(1)        ;22  Getting the keypress results back
  160.  ld (keyread),a  ;35  And loading the key value so the rest of the app can see
  161.  cpl             ;39  Inverting keyread for logic benefit
  162.  ld b,a          ;43  B = Key read
  163.  ld hl,mdanmaku  ;53
  164.  ld c,(hl)       ;60
  165.  ld a,%00000000  ;67 Timed for safety
  166.  out ($11),a     ;11  @@ PLUS SIGN (1/8)
  167.  ld a,b          ;15
  168.  ld b,%11110000  ;22  Negate movement mask. Timed for consistency.
  169.  bit isdying,c   ;30  Checking to see if movement is to be negated.
  170.  jr z,$+3        ;42/37
  171. ; and b           ;   41
  172.  nop
  173.  ld b,a          ;46/45 B = Keycode
  174.  rlca            ;50/49 isfocused=b1,mode=b6. 3 rotate lefts.
  175.  rlca            ;54/53
  176.  rlca            ;58/57
  177.  ld e,a          ;62/61
  178.  ld a,%00011000  ;69/68
  179.  out ($11),a     ;11  @@ PLUS SIGN (2/8)
  180.  ld a,c          ;15  Flags!
  181.  xor e           ;19  Current keypress thing.
  182.  and %11111101   ;26  Making only the focused flag stick
  183.  xor e           ;30  Stuck.
  184.  ld (hl),a       ;37  Next up: Movement, then address calculations.
  185.  ld de,(chary)   ;57  DE= character positions
  186.  ld a,%00011000  ;64  @@ PLUS SIGN (3/8)
  187.  nop             ;68  Timed for safety
  188.  out ($11),a     ;11  >>> INTERLACING CHARACTER MOVEMENT WITH SCREENDRAW
  189.  ld hl,chardu    ;21  HL= pointer to ofset thinger.
  190.  ld a,(mdanmaku) ;34  Pulling for isfocused flag 1
  191.  rrca            ;38  Move to bit 0 position
  192.  and 1           ;45  isolate that bit
  193.  add a,L         ;49  and then increment chardu if needed to chardf
  194.  ld L,a          ;53  Autoset movement delta to correct address dpn of focused
  195.  ld a,%01111110  ;60  @@ PLUS SIGN (4/8)
  196.  ld sp,hl        ;66  Timed for safety. SP is junk anyway.
  197.  out ($11),a     ;11
  198.  ld a,b          ;15  Loading in key read
  199.  and %00001001   ;22  Processing up/down events. Bits will be unset if pushed
  200.  jp z,LCDD01     ;32  Jump past a load of bull and add zero to the final tally
  201.  rrca            ;36  If carry, then negate movement delta.
  202.  ld a,(hl)       ;43  But first load that delta in! (does not affect flags)
  203.  jr c,$+4        ;55/50
  204.  neg             ;  /58
  205. LCDR01: ld c,a   ;59/62 C = DY saved
  206.  ld a,%01111110  ;66/69 @@ PLUS SIGN (5/8)
  207.  out ($11),a     ;11
  208.  ld a,b          ;15 Loading in key read
  209.  and   %00000110 ;22 Processing right/left events
  210.  jp z,LCDD02     ;32 Jump past if zero. Then add it later on.
  211.  add a,%11111100 ;39 If right (neg), carry will result.
  212.  ld a,(hl)       ;46
  213.  jr c,$+4        ;58/53
  214.  neg             ;  /61 DISCARD HL
  215. LCDR02: ld L,a   ;62/65 L = DX saved
  216.  ld a,%00011000  ;69/72 @@ PLUS SIGN (6/8)
  217.  out ($11),a     ;11
  218.  ld h,(56*4)+1   ;15 H = boundary test condition
  219.  ld a,e          ;19 CurY
  220.  add a,c         ;23 CurY+DY
  221.  cp h            ;27 Check boundary. If no carry, exceed boundaries.
  222.  jr c,$+3        ;39/34
  223.  sub c           ;  /38 CurY-DY for case reversion. DISCARD C
  224.  ld e,a          ;43/42 E = New CharY
  225.  ld a,d          ;47/46 CurX
  226.  add a,L         ;51/50 CurX+DX
  227.  inc bc          ;57/56 Timed for safety.
  228.  ld c,a          ;61/60 C = New CharY TEMP SAVED
  229.  ld a,%00011000  ;68/67 @@ PLUS SIGN (7/8)
  230.  out ($11),a     ;11
  231.  ld a,c          ;15 CurX
  232.  cp h            ;19 Check boundary
  233.  jr c,$+3        ;31/26 If no carry, exceeded boundaries
  234.  sub L           ;  /30 CurX-DX for case reversion. DISCARD L
  235.  ld d,a          ;35/34 D = New CharX
  236.  ld (chary),de   ;55/54 Save new CharX/CharY.
  237.  xor a           ;59/58
  238.  ex de,hl        ;63/62 HL= xxxxxx00 yyyyyy00
  239.  ld c,a          ;67/66 @@ PLUS SIGN (8/8)
  240.  out ($11),a     ;11 >>> INTERLACING CHARACTER SPRITE DRAW WITH SCREENDRAW
  241.  ld b,h          ;15 B = xxxxxx00
  242.  add hl,hl       ;26 HL= x xxxxx00y yyyyy000
  243.  ld a,h          ;30 A = x xxxxx00y
  244.  rla             ;34 A = x xxxx00yx
  245.  rla             ;38 A = x xxx00yxx
  246.  rla             ;42 A = x xx00yxxx
  247.  xor L           ;46
  248.  and %00000111   ;53 High bits of L, low bits of A.
  249.  xor L           ;57
  250.  ld L,a          ;61 L of HL completed.
  251.  ld a,%00000000  ;68 @@ PRETICK SPACER (0/8)
  252.  out ($11),a     ;11
  253.  ld a,(charlives) ;24 TICKING BAR PRELOADER
  254.  exx             ;28 Move to SHADOW registers
  255.  ld e,a          ;32 Shadow E = counter
  256.  ld bc,$3C11     ;42 Shadow B = Tickmark , Shadow C = Output port number
  257.  or a            ;46 Making sure counter ins't already zero.
  258.  jr nz,$+3       ;58/53 Otherwise, zero out the tickmarker.
  259.  ld b,e          ;  /57
  260.  ld d,0          ;65/64 Clearing out D for forced zero when convenient.
  261.  nop             ;69/68 Timed for safety
  262.  out (c),b       ;12 @@ TICK MARK (1/8)
  263.  exx             ;15 Move to REGULAR registers
  264.  ld a,(mdanmaku) ;27 Getting danmaku flags directly. Want isfocused [1]
  265.  rlca            ;31 Moving to bit 2 for $0400 adder
  266.  cpl             ;-- RE-TIME LATER.
  267.  or  %10000000   ;38 Putting high bit in for $8(4|0)00
  268.  and %10000100   ;45 And isolating those flags
  269.  xor h           ;49
  270.  and %11111110   ;56 High bits of A, low bit of H [y]
  271.  xor h           ;60
  272.  ld h,a          ;64 Completed H of HL. HL now points to screen buffer.
  273.  xor a           ;68 @@ BLANK SPACE (1/8)
  274.  out ($11),a     ;11
  275.  ld a,b          ;15 xxxxxx00
  276.  rrca \ rrca     ;23 00xxxxxx
  277.  and %00000111   ;30 00000xxx
  278.  ld e,a          ;34 low byte to DE [E] sprite mask made. Using BOX for...
  279.  ld d,$40        ;41 DE = hitbox mask
  280.  ld a,(de)       ;48
  281.  exx \ dec e     ;54
  282.  jp nz,$+4       ;66
  283.  ld b,e          ;70
  284.  out (c),b       ;12 @@ TICK MARK (2/8)
  285.  exx             ;16
  286.  ld c,a          ;20
  287.  ld b,e          ;-- POS. Not going to retime.
  288.  set 3,e         ;28 get to sprite masker
  289.  ld a,(de)       ;35 get mask
  290.  ld e,a          ;39 E=mask (right side)
  291.  and c           ;43 right side hitbox
  292.  ld d,a          ;47 D=hitbox (right side)
  293.  ld a,e          ;51
  294.  cpl             ;55
  295.  and c           ;59 left side hitbox
  296.  ld c,a          ;63 C=hitbox (left side)
  297.  xor a           ;67
  298.  out ($11),a     ;11 @@ BLANK SPACE (2/8)
  299.  ld sp,8*3       ;21 To center of sprite for hitbox checking
  300.  add hl,sp       ;32 Bringing to address.
  301.  ld e,-1         ;39
  302.  ld a,(hl)       ;46
  303.  nop             ;50 Timed for safety
  304.  exx \ dec e     ;58
  305.  jr nz,$+3       ;70/69
  306.  ld b,e          ;70/69
  307.  out (c),b       ;12 @@ TICK MARK (3/8)
  308.  exx             ;16
  309.  ld sp,7         ;26 More preparations.
  310.  ld (itemp1),hl  ;42 Location for hitbox. We're only testing.
  311.  res 2,h         ;50 the black part of the buffer.
  312.  and c           ;54
  313.  add a,e         ;58 If anything is result, collide (carry)
  314.  rl  b           ;66 0000xxxr
  315.  xor a           ;70
  316.  out ($11),a     ;11 @@ BLANK SPACE (3/8)
  317.  inc HL          ;15+2
  318.  ld a,(hl)       ;22
  319.  and d           ;26
  320.  add a,e         ;30
  321.  rl  b           ;38
  322.  add hl,sp       ;49
  323.  exx \ dec e     ;57
  324.  jr nz,$+3       ;69/64
  325.  ld b,e          ;69/68
  326.  out (c),b       ;12 @@ TICK MARK (4/8)
  327.  exx             ;16
  328.  ld a,(hl)       ;23
  329.  and c           ;27
  330.  add a,e         ;31
  331.  rl  b           ;39 00xxxrrr
  332.  inc HL          ;43+2
  333.  ld a,(hl)       ;50
  334.  and d           ;54
  335.  add a,e         ;58
  336.  rl  b           ;66 Finished getting four flags for possible collisions.
  337.  xor a           ;70
  338.  out ($11),a     ;11 @@ BLANK SPACE (4/8)
  339.  ld hl,(itemp1)  ;27 Restoring buffer address so I can draw the hitbox
  340.  ld a,(hl)       ;34 Now drawing the hitbox.
  341.  or c            ;38
  342.  ld (hl),a       ;45
  343.  inc HL          ;49+2
  344.  exx \ dec e     ;57
  345.  jr nz,$+3       ;69/68
  346.  ld b,e          ;69/68
  347.  out (c),b       ;12 @@ TICK MARK (5/8)
  348.  exx             ;16
  349.  ld a,(hl)       ;23
  350.  or d            ;27
  351.  ld (hl),a       ;34
  352.  add hl,sp       ;45
  353.  ld a,(hl)       ;52
  354.  or c            ;56
  355.  ld (hl),a       ;60
  356.  inc HL          ;64+2
  357.  xor a           ;68 @@ BLANK SPACE (5/8)
  358.  out ($11),a     ;11
  359.  ld a,(hl)       ;18
  360.  or d            ;22
  361.  ld (hl),a       ;29
  362.  ld sp,-(36-3)   ;39
  363.  add hl,sp       ;50 Back to the original address.
  364.  exx \ dec e     ;58
  365.  jr nz,$+3       ;70/65
  366.  ld b,e          ;70/69
  367.  out (c),b       ;12 @@ TICK MARK (6/8)
  368.  exx             ;16
  369.  ld a,b          ;20 0xxxrrrr
  370.  and %00001111   ;27 checking to see if there's any collisions
  371.  add a,e         ;31 boiling down to a single flag
  372.  rla             ;35 and we have that single flag
  373.  and 1           ;42
  374.  ld c,a          ;46 save it.
  375.  ld sp,7         ;56 Preparing SP for sprite run a bit later. Timed for safety
  376.  nop             ;60
  377.  ld a,%00000000  ;67 Also timed for safety
  378.  out ($11),a     ;11 @@ BLANK SPACE (6/8)
  379.  ld a,(mdanmaku) ;24 Flags to go by.
  380.  and %00010100   ;31 Get isrecovering and isbombing
  381.  add a,e         ;35 Uh huh.
  382.  ccf             ;39 So 0=IsInvincible. Used to block collision flag
  383.  and c           ;43
  384.  ld c,a          ;48 b0 is flag we need to merge with
  385.  exx \ dec e     ;56
  386.  jr nz,$+3       ;68/67
  387.  ld b,e          ;68/67
  388.  out (c),b       ;12 @@ TICK MARK (7/8)
  389.  exx             ;16
  390.  ld a,c          ;20 need to move to bit 3. At bit 0 atm.
  391.  rlca            ;24 b1
  392.  rlca            ;28 b2
  393.  rlca            ;32 b3
  394.  ld c,a          ;36 Saving this back to C so flag can be loaded directly
  395.  ld a,(mdanmaku) ;49 Loading flags directly
  396.  or c            ;53 May only set isdying if it is the case.
  397.  ld (mdanmaku),a ;66
  398.  xor a           ;70
  399.  out ($11),a     ;11 @@ BLANK SPACE (7/8)
  400.  or c            ;15 A=0. Check if collision happened
  401.  jp z,$+9        ;25 Jump if no collision
  402.  ld a,(charbolad) ;not worrying about overages here. Happens so rarely.
  403.  ld (charcurbolad),a
  404.  ld a,h          ;29
  405.  xor %00000100   ;36 toggling buffer for sprite drawing.
  406.  ld h,a          ;40
  407.  ld a,b          ;44 0xxxrrrr
  408.  rrca            ;48 --xxx---
  409.  exx \ dec e     ;56
  410.  jr nz,$+3       ;68/67
  411.  ld b,e          ;68/67
  412.  out (c),b       ;12 @@ TICK MARK (8/8)
  413.  exx             ;16
  414.  and %00111000   ;23
  415.  ld b,a          ;27 --xxx---
  416.  rrca            ;31 ---xxx--
  417.  rrca            ;35 ----xxx-
  418.  rrca            ;39 -----xxx
  419.  add a,8         ;46 To address of spritemask
  420.  ld e,a          ;50
  421.  ld d,$40        ;57 complete address retrieved
  422.  ld a,(de)       ;61
  423.  ld c,a          ;65
  424.  exx             ;69
  425.  out (c),d       ;12 @@ BLANK SPACE (8/8)
  426.  exx             ;16
  427.  ld e,b          ;20 Moving sprite offset to low byte DE for new address
  428.  cpl             ;24 Negating flag and moving that mess off to B
  429.  ld b,a          ;28 Inverses flag for other sprite half
  430.  ld d,$87        ;35 Address to sprite is now complete.
  431.  exx             ;39
  432.  ld a,(charcurbombs) ;52
  433.  ld e,a          ;56 Shadow E = counter
  434.  ld bc,$3C11     ;66 Shadow B = Tickmark , Shadow C = Output port number
  435.  out (c),d       ;12 @@ BOMB SPRITE (1/8)
  436.  or a            ;16
  437.  jr nz,$+3       ;23
  438.  ld b,e          ;27
  439.  exx             ;31
  440.  bit isrecovering,(iy+danmakuflags) ;51
  441.  ld a,%01011100  ;58 @@ BOMB SPRITE (2/8) byte prepare
  442.  jp z,$+16       ;68
  443.  out ($11),a     ;-- 2/8 byte write
  444.  ld a,(gametimer1) ;--
  445.  and %00010000   ;--
  446.  jp z,DSBNOSPRT  ;--
  447.  jp $+5          ;--
  448.  out ($11),a     ;11 2/8 byte write (no, this is not a typo)
  449.  ld a,(de)       ;18 @@ SPRITE CYCLE (1/8), sprite
  450.  or  (hl)         ;25 Bring in screenbuf
  451.  and b           ;29 Zeroes where screenbuf stays.
  452.  or  (hl)        ;36 Bring back sprite parts.
  453.  ld (hl),a       ;43
  454.  inc HL          ;47+2
  455.  ld a,(de)       ;54
  456.  exx             ;58
  457.  ld L,%01111110  ;65
  458.  nop             ;69
  459.  out (c),L       ;12 @@ BOMB SPRITE (3/8)
  460.  exx             ;16
  461.  or  (hl)        ;23
  462.  and c           ;27
  463.  or  (hl)        ;34
  464.  ld (hl),a       ;41
  465.  add hl,sp       ;52
  466.  inc e           ;56
  467.  nop             ;60
  468.  ld a,%01110110  ;67
  469.  out ($11),a     ;11 @@ BOMB SPRITE (4/8)
  470.  
  471.  ld a,(de)       ;18 @@ SPRITE CYCLE (2/8), sprite
  472.  or (hl)        ;25 Bring in screenbuf
  473.  and b           ;29 Zeroes where screenbuf stays.
  474.  or (hl)        ;36 Bring back sprite parts.
  475.  ld (hl),a       ;43
  476.  inc HL          ;47+2
  477.  ld a,(de)       ;54
  478.  exx             ;58
  479.  ld L,%01110110  ;65
  480.  nop             ;69
  481.  out (c),L       ;12 @@ BOMB SPRITE (5/8)
  482.  exx             ;16
  483.  or (hl)        ;23
  484.  and c           ;27
  485.  or (hl)        ;34
  486.  ld (hl),a       ;41
  487.  add hl,sp       ;52
  488.  inc e           ;56
  489.  nop             ;60
  490.  ld a,%01111110  ;67
  491.  out ($11),a     ;11 @@ BOMB SPRITE (6/8)
  492.  
  493.  ld a,(de)       ;18 @@ SPRITE CYCLE (3/8), sprite
  494.  or  (hl)        ;25 Bring in screenbuf
  495.  and b           ;29 Zeroes where screenbuf stays.
  496.  or  (hl)        ;36 Bring back sprite parts.
  497.  ld (hl),a       ;43
  498.  inc HL          ;47+2
  499.  ld a,(de)       ;54
  500.  exx             ;58
  501.  ld L,%01011100  ;65
  502.  nop             ;69
  503.  out (c),L       ;12 @@ BOMB SPRITE (7/8)
  504.  exx             ;16
  505.  or  (hl)        ;23
  506.  and c           ;27
  507.  or  (hl)        ;34
  508.  ld (hl),a       ;41
  509.  add hl,sp       ;52
  510.  inc e           ;56
  511.  nop             ;60
  512.  ld a,%00000000  ;67
  513.  out ($11),a     ;11 @@ BOMB SPRITE (8/8)
  514. ;Starting bomb ticker section
  515.  ld a,(de)       ;18 @@ SPRITE CYCLE (4/8), sprite
  516.  or  (hl)        ;25 Bring in screenbuf
  517.  and b           ;29 Zeroes where screenbuf stays.
  518.  or  (hl)        ;36 Bring back sprite parts.
  519.  ld (hl),a       ;43
  520.  inc HL          ;47+2
  521.  ld a,(de)       ;54
  522.  or  (hl)        ;61
  523.  and c           ;65
  524.  exx             ;69
  525.  out (c),d       ;12 @@ BLANK SPACE (0/8)
  526.  exx             ;16
  527.  or  (hl)        ;23
  528.  ld (hl),a       ;30
  529.  add hl,sp       ;41
  530.  inc e           ;45
  531.  exx \ dec e     ;53
  532.  jr nz,$+3       ;65/60
  533.  ld b,e          ;  /64
  534.  nop             ;69/68
  535.  out (c),b       ;12 @@ TICK MARK (1/8)
  536.  exx             ;16
  537.  
  538.  ld a,(de)       ;23 @@ SPRITE CYCLE (5/8), sprite
  539.  or  (hl)        ;30 Bring in screenbuf
  540.  and b           ;34 Zeroes where screenbuf stays.
  541.  or  (hl)        ;41 Bring back sprite parts.
  542.  ld (hl),a       ;48
  543.  inc HL          ;52+2
  544.  ld a,(de)       ;59
  545.  or  (hl)        ;66
  546.  and c           ;70
  547.  exx             ;74
  548.  out (c),d       ;12 @@ BLANK SPACE (1/8)
  549.  exx             ;16
  550.  or  (hl)        ;23
  551.  ld (hl),a       ;30
  552.  add hl,sp       ;41
  553.  inc e           ;45
  554.  exx \ dec e     ;53
  555.  jr nz,$+3       ;65/60
  556.  ld b,e          ;  /64
  557.  nop             ;69/68
  558.  out (c),b       ;12 @@ TICK MARK (2/8)
  559.  exx             ;16
  560.  
  561.  ld a,(de)       ;23 @@ SPRITE CYCLE (6/8), sprite
  562.  or  (hl)        ;30 Bring in screenbuf
  563.  and b           ;34 Zeroes where screenbuf stays.
  564.  or  (hl)        ;41 Bring back sprite parts.
  565.  ld (hl),a       ;48
  566.  inc HL          ;52+2
  567.  ld a,(de)       ;59
  568.  or  (hl)        ;66
  569.  and c           ;70
  570.  exx             ;74
  571.  out (c),d       ;12 @@ BLANK SPACE (2/8)
  572.  exx             ;16
  573.  or  (hl)        ;23
  574.  ld (hl),a       ;30
  575.  add hl,sp       ;41
  576.  inc e           ;45
  577.  exx \ dec e     ;53
  578.  jr nz,$+3       ;65/60
  579.  ld b,e          ;  /64
  580.  nop             ;69/68
  581.  out (c),b       ;12 @@ TICK MARK (3/8)
  582.  exx             ;16
  583.  
  584.  ld a,(de)       ;23 @@ SPRITE CYCLE (7/8), sprite
  585.  or  (hl)        ;30 Bring in screenbuf
  586.  and b           ;34 Zeroes where screenbuf stays.
  587.  or  (hl)        ;41 Bring back sprite parts.
  588.  ld (hl),a       ;48
  589.  inc HL          ;52+2
  590.  ld a,(de)       ;59
  591.  or  (hl)        ;66
  592.  and c           ;70
  593.  exx             ;74
  594.  out (c),d       ;12 @@ BLANK SPACE (3/8)
  595.  exx             ;16
  596.  or  (hl)        ;23
  597.  ld (hl),a       ;30
  598.  add hl,sp       ;41
  599.  inc e           ;45
  600.  exx \ dec e     ;53
  601.  jr nz,$+3       ;65/60
  602.  ld b,e          ;  /64
  603.  nop             ;69/68
  604.  out (c),b       ;12 @@ TICK MARK (4/8)
  605.  exx             ;16
  606.  
  607.  ld a,(de)       ;23 @@ SPRITE CYCLE (8/8), sprite
  608.  or  (hl)        ;30 Bring in screenbuf
  609.  and b           ;34 Zeroes where screenbuf stays.
  610.  or  (hl)        ;41 Bring back sprite parts.
  611.  ld (hl),a       ;48
  612.  inc HL          ;52+2
  613.  ld a,(de)       ;59
  614.  or  (hl)        ;66
  615.  and c           ;70
  616.  exx             ;74
  617.  out (c),d       ;12 @@ BLANK SPACE (4/8)
  618.  exx             ;16
  619.  or  (hl)        ;23
  620.  ld (hl),a       ;30
  621.  add hl,sp       ;41
  622.  inc e           ;45
  623.  exx \ dec e     ;53
  624.  jr nz,$+3       ;65/60
  625.  ld b,e          ;  /64
  626.  nop             ;69/68
  627.  out (c),b       ;12 @@ TICK MARK (5/8)
  628.  exx             ;16
  629.  pop de          ;26
  630. DSBNOSPRTR:      ;Returning from no sprite routine. Riiight.
  631.  ld b,3          ;
  632.  pop de          ;39
  633.  pop de          ;49
  634.  or (hl)         ;56
  635.  inc de          ;62
  636.  exx             ;66
  637.  out (c),d       ;12 blank space
  638.  exx             ;16
  639.  pop de          ;26
  640.  pop de          ;36
  641.  or (hl)         ;43
  642.  nop             ;47
  643.  exx \ dec e     ;55
  644.  jr nz,$+3       ;67/62
  645.  ld b,e          ;  /66
  646.  out (c),b       ;12 @@ TICK MARK (5/8)
  647.  exx             ;16
  648.  djnz DSBNOSPRTR+2 ;29/24
  649.  pop de          ;34 waste
  650.  ld sp,(itemp4)  ;54
  651.  nop             ;58
  652.  nop             ;62
  653.  xor a           ;66
  654.  out ($11),a     ;11
  655.  ld hl,DSBswdspt ;21
  656.  ld b,7          ;29
  657.  call DSBDRAWSP  ;22 -->45+
  658.  ld a,(charpower) ;35
  659.  call DSBDRAWNM  ;  -->61
  660.  xor a
  661.  out ($11),a       ;11
  662.  ld hl,DSBkilspr-1 ;27
  663.  ld bc,(curkills)  ;47
  664.  ld a,$20+10       ;54
  665.  ld b,7            ;61
  666.  inc hl            ;67
  667.  out ($10),a       ;11
  668.  
  669.  nop \ nop         ;## Not timed. Something wonky is going on and timings out.
  670.  call DSBDRAWSPB   ;re-timed.
  671.  nop \ nop         ;## Not timed. Something wonky is going on and timings out.
  672.  inc c             ;due to effect in the DSBDRAWSP(B) routine
  673.  ld a,c
  674.  call DSBDRAWNM
  675.  ld hl,DSBscrspr
  676.  ld b,6            ;displaying only the first 6 bytes of 11. For accelerations
  677.  call DSBDRAWSP    ;22
  678.  ld a,(mgameset)   ;35
  679.  bit 4,a           ;43 settings yes.
  680.  jp nz,DSBDHEXSC   ;53 jump to hex score displayer. Padding digits please!
  681.  ld a,%01111000    ;60 score sprite cycle 07
  682.  inc hl            ;66 timed for safety
  683.  out ($11),a       ;11
  684.  ld (itemp1),sp    ;31
  685.  ld sp,billiontab  ;41
  686.  ld ix,(curscore+0) ;61
  687.  ld a,%00000100    ;68 score sprite cycle 08
  688.  out ($11),a       ;11
  689.  ld hl,(curscore+2) ;27
  690.  
  691.  
  692. ; ld hl,(scorefilebase)  ;debug information to keep the score going up
  693. ; inc hl
  694. ;; inc hl
  695. ; ld c,(hl)
  696. ; inc hl
  697. ; ld b,(hl)
  698. ; inc hl
  699. ; ld e,(hl)
  700. ; inc hl
  701. ; ld d,(hl)
  702. ; ld ixh,b
  703. ; ld ixl,c
  704. ; ex de,hl
  705.  
  706.  pop bc            ;37
  707.  pop de            ;47
  708.  ld iy,NumberTable ;61
  709.  ld a,%01111110    ;68 score sprite cycle 09 timed for safety
  710.  out ($11),a       ;11
  711.  ld a,$FF          ;18
  712.  inc a             ;22 4
  713.  add ix,bc         ;37 15
  714.  adc hl,de         ;52 15
  715.  jr c,$-5          ;58 12/7
  716.  ld bc,$3C11       ;68 score sprite cycle 10 timed for safety
  717.  out (c),b         ;12 cherry flavoured source team GO!
  718.  add a,a           ;16
  719.  add a,a           ;20 Out of order processing. Don't cry. It's quite alright.
  720.  ld c,a            ;24 assert("It's going to be okay");
  721.  xor a             ;28
  722.  ld b,a            ;32
  723.  pop de            ;42
  724.  add ix,de         ;57
  725.  pop de            ;67
  726.  out ($11),a       ;11 score sprite cycle 11. Near perfect timing.
  727.  adc hl,de         ;26
  728.  add iy,bc         ;41 BREAK!
  729.  
  730.  ld a,10           ;48 ten digits to look after. 1.000.000.000
  731. DSBDECSCOLP:
  732.  ex af,af'         ;52 62
  733. pop bc            ;62 72
  734. pop de            ;72 82
  735. ld a,(iy+0)       ;91 101
  736. out ($11),a       ;11
  737. ld a,$FF          ;18
  738. inc a             ;22
  739. add ix,bc         ;37
  740. adc hl,de         ;52
  741. jr c,$-5          ;59
  742. ld c,a            ;63
  743. ld a,(iy+1)       ;82
  744. out ($11),a       ;11
  745. pop de            ;21
  746. add ix,de         ;36
  747. pop de            ;46
  748. ld a,(iy+2)       ;65 arghamahblabbles!
  749. nop               ;69 BAD CODE! WORST ENEMY! *rolls newspaper* WHAP WHAP WHAP
  750. out ($11),a       ;11
  751. adc hl,de         ;26
  752. ld a,c            ;30
  753. add a,a           ;34
  754. add a,a           ;38
  755. ld c,a            ;42
  756. ld b,0            ;49
  757. ld a,(iy+3)       ;68
  758. out ($11),a       ;11
  759. ld iy,NumberTable ;25
  760. add iy,bc         ;40
  761. ex af,af'         ;44
  762.  dec a             ;48
  763.  jp nz,DSBDECSCOLP ;58
  764.  ld sp,(itemp1)
  765.  ld iy,myflags
  766.  jp DSBSCORCOLL
  767. DSBDHEXSC:
  768.  ld b,5            ;Finishing off the rest of the display. Doing hex digits
  769.  call DSBDRAWSP    ;22 doesn't really need "acceleration".
  770.  ld hl,NumberTable ;32 Getting at that zero at the start. Padding digits.
  771.  ld b,4            ;39 Yesss.
  772.  call DSBDRAWSP    ;45 These are well-timed routines.
  773.  ld hl,NumberTable
  774.  ld b,4
  775.  call DSBDRAWSP    ;22
  776.  ld hl,curscore+3
  777.  ld a,(hl)
  778.  dec hl
  779.  call DrawHexToLCD ;Not timed. Makes it easier to use this for debugging
  780.  ld a,(hl)
  781.  dec hl
  782.  call DrawHexToLCD
  783.  ld a,(hl)
  784.  dec hl
  785.  call DrawHexToLCD
  786.  ld a,(hl)
  787.  call DrawHexToLCD
  788. DSBSCORCOLL:
  789.  
  790. ;=============================================================================
  791. ;=============================================================================
  792. ; To display or not to display boss mode items? That's stuff after here!
  793. ;=============================================================================
  794. ;=============================================================================
  795. ;Edit: Add later.
  796.  
  797.  
  798.  ld a,$20+09
  799.  ld b,$00
  800.  call DSBCOLBYT
  801.  ld a,$20+08
  802.  ld b,$80
  803.  call DSBCOLBYT
  804.  
  805. ; push hl
  806. ; pop hl
  807. ; push hl
  808. ; pop hl
  809. ; push hl
  810. ; pop hl
  811. ; ld a,$20+9
  812. ; out ($10),a
  813. ; push hl
  814. ; pop hl
  815. ; push hl
  816. ; pop hl
  817. ; ld a,(mdanmaku)
  818. ; call DrawHexToLCD
  819. ; ld a,(gametimer1)
  820. ; call DrawHexToLCD
  821.  ret
  822. ;-----------------------------------------------------------------------------
  823. ;-----------------------------------------------------------------------------
  824. ;-----------------------------------------------------------------------------
  825. ;-----------------------------------------------------------------------------
  826.  
  827. DSBNOSPRT:
  828.  ld sp,(itemp4)
  829.  ld hl,DSBbmbspt
  830.  ld b,6
  831.  call DSBDRAWSP
  832.  ld b,8
  833.  jp DSBNOSPRTR+2
  834. DSBswdspt:     ;7 high
  835. .db %00000000
  836. .db %00000110
  837. .db %00001110
  838. .db %01101100
  839. .db %00110000
  840. .db %00111000
  841. .db %01001000
  842. DSBbmbspt:     ;6 high
  843. .db %01111110
  844. .db %01110110
  845. .db %01110110
  846. .db %01111110
  847. .db %01011100
  848. .db %00000000
  849. DSBkilspr:     ;7 high
  850. .db %00000000
  851. .db %01111110
  852. .db %01000110
  853. .db %01001110
  854. .db %01110010
  855. .db %01100010
  856. .db %01111110
  857.  
  858. DSBscrspr:    ;11 high. May not need all that. We'll be accelerating the
  859. .db %00000000 ;score counter in a few of the later cycles.
  860. .db %00000000
  861. .db %00111100
  862. .db %01111110
  863. .db %00100000
  864. .db %00011110
  865. .db %01111000
  866. .db %00000100
  867. .db %01111110
  868. .db %00111100
  869. .db %00000000
  870.  
  871.  
  872.  
  873. ;Draw the remaining 7 ticks 8 spaces w/o sprite draw. Time-free. Draw tick nxt
  874.  
  875.  
  876.  
  877. ;ROUTINES HERE ARE FOR DELAY PURPOSES.
  878. ;Naming schema:
  879. ;Entry: LCDDnn
  880. ;Exit:  LCDRnn
  881. LCDD01:   ;@32cc on jump, less 7 for load
  882.  inc hl    ;38
  883.  dec hl    ;44
  884.  nop       ;48
  885.  jp LCDR01 ;62+11
  886. LCDD02:   ;@32cc on jump, less 7 for load
  887.  inc hl    ;38
  888.  dec hl    ;44
  889.  nop       ;48
  890.  nop       ;52
  891.  jp LCDR02 ;62+11
  892.  
  893. DSBDRAWSP:   ;45 Input B must be more than 1.
  894.  dec b       ;49
  895.  ld a,(hl)   ;56
  896.  inc hl      ;62
  897.  nop         ;66
  898.  out ($11),a ;11
  899. DSBDRAWSPB:  ;break-in
  900.  ld a,(hl)   ;18
  901.  inc hl      ;24
  902.  push hl     ;35
  903.  pop hl      ;45
  904.  nop         ;49
  905.  nop         ;53
  906.  djnz $-8    ;66/61
  907.  dec bc      ;67
  908.  out ($11),a ;11
  909.  ret         ;22
  910.  
  911. DSBDRAWNM:
  912.  cp 100
  913.  jr c,$+4
  914.  ld a,99
  915.  ld bc,$0AFF    ;   B=-1,C=10 for count
  916.  ld de,$01FF
  917.  inc c
  918.  sub b
  919.  jp nc,$-2
  920.  add a,b
  921.  inc e
  922.  sub d
  923.  jp nc,$-2
  924.  inc a
  925.  out ($11),a    ;spacer before number
  926.  ld b,a
  927.  ld d,a
  928.  ld a,e
  929.  add a,a
  930.  add a,a
  931.  add a,e ;x5
  932.  ld e,a
  933.  ld hl,DSBDRAWNMTBL
  934.  add hl,de
  935.  ex de,hl
  936.  ld a,c
  937.  add a,a
  938.  add a,a
  939.  add a,c
  940.  ld c,a
  941.  ld hl,DSBDRAWNMTBL
  942.  add hl,bc
  943.  ld bc,$050F
  944.  ld a,(de)   ;ones digit
  945.  xor (hl)    ;tens digit
  946.  and c
  947.  xor (hl)    ;write tens digit into high nibble.
  948.  out ($11),a ;11
  949.  inc hl      ;17
  950.  inc de      ;23
  951.  djnz $-8    ;31
  952.  ret         ;41
  953. DSBDRAWNMTBL:
  954. .db %01000100 ;0
  955. .db %10101010 ;
  956. .db %10101010 ;
  957. .db %10101010 ;
  958. .db %01000100 ;
  959. .db %01000100 ;1
  960. .db %11001100 ;
  961. .db %01000100 ;
  962. .db %01000100 ;
  963. .db %11101110 ;
  964. .db %11001100 ;2
  965. .db %00100010 ;
  966. .db %01000100 ;
  967. .db %10001000 ;
  968. .db %11101110 ;
  969. .db %11001100 ;3
  970. .db %00100010 ;
  971. .db %11001100 ;
  972. .db %00100010 ;
  973. .db %11001100 ;
  974. .db %10101010 ;4
  975. .db %10101010 ;
  976. .db %11101110 ;
  977. .db %00100010 ;
  978. .db %00100010 ;
  979. .db %11101110 ;5
  980. .db %10001000 ;
  981. .db %11001100 ;
  982. .db %00100010 ;
  983. .db %11001100 ;
  984. .db %01100110 ;6
  985. .db %10001000 ;
  986. .db %11001100 ;
  987. .db %10101010 ;
  988. .db %11101110 ;
  989. .db %11101110 ;7
  990. .db %00100010 ;
  991. .db %01000100 ;
  992. .db %01000100 ;
  993. .db %01000100 ;
  994. .db %11101110 ;8
  995. .db %10101010 ;
  996. .db %01000100 ;
  997. .db %10101010 ;
  998. .db %11101110 ;
  999. .db %11101110 ;9
  1000. .db %10101010 ;
  1001. .db %01100110 ;
  1002. .db %00100010 ;
  1003. .db %11001100 ;
  1004.  
  1005. DSBCOLBYT:  ;A=$10out, B=$11out for 64 cycles
  1006.  push hl
  1007.  pop hl
  1008.  push hl
  1009.  pop hl
  1010.  out ($10),a
  1011.  ld a,b
  1012.  ld b,64
  1013.  push hl
  1014.  pop hl
  1015.  push hl
  1016.  pop hl
  1017.  out ($11),a
  1018.  djnz $-6
  1019.  ret
  1020.  
  1021. billiontab: ;lsw first
  1022. .dw $3600,$C465,$CA00,$3B9A ;1,000,000,000
  1023. .dw $1F00,$FA0A,$E100,$05F5 ;  100,000,000
  1024. .dw $6980,$FF67,$9680,$0098 ;   10,000,000
  1025. .dw $BDC0,$FFF0,$4240,$000F ;    1,000,000
  1026. .dw $7960,$FFFE,$86A0,$0001 ;      100,000
  1027. .dw $D8F0,$FFFF,$2710,$0000 ;       10,000
  1028. .dw $FC18,$FFFF,$03E8,$0000 ;        1,000
  1029. .dw $FF9C,$FFFF,$0064,$0000 ;          100
  1030. .dw $FFF6,$FFFF,$000A,$0000 ;           10
  1031. .dw $FFFF,$FFFF,$0001,$0000 ;            1
  1032. .dw $FFFF,$FFFF             ;  dummy entry
  1033.  
  1034.  
  1035.  
  1036. ;=============================================================================
  1037. ;=============================================================================
  1038. ;=============================================================================
  1039. BARDEBUG:
  1040.  ld sp,(itemp4)
  1041.  ld a,$AA  \ call DrawHexToLCD
  1042.  ret
  1043.  
  1044.  
  1045.  
  1046.  
  1047. DrawHexToLCD:  ;input: A=numbertowrite
  1048.  push af
  1049.   push bc
  1050.    push de
  1051.     push hl
  1052.      ld c,a
  1053.      ld de,NumberTable
  1054.      bit binscoremode,(iy+gamesettings)
  1055.      jr z,$+5
  1056.      ld de,BinaryNumberTable
  1057.      and %11110000
  1058.      rrca
  1059.      rrca
  1060.      ld L,a
  1061.      ld h,0
  1062.      add hl,de
  1063.      call WriteHexDigitsToLCD
  1064.      ld a,c
  1065.      and %00001111
  1066.      ld L,a
  1067.      ld h,0
  1068.      add hl,hl
  1069.      add hl,hl
  1070.      add hl,de
  1071.      call WriteHexDigitsToLCD
  1072.     pop hl
  1073.    pop de
  1074.   pop bc
  1075.  pop af
  1076.  ret
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083. WriteHexDigitsToLCD:
  1084.  ld b,4
  1085.  ld a,(hl)
  1086.  out ($11),a
  1087.  push hl
  1088.  pop hl
  1089.  push hl
  1090.  pop hl
  1091.  push hl
  1092.  pop hl
  1093.  inc hl
  1094.  djnz WriteHexDigitsToLCD+2
  1095.  ret
  1096.  
  1097. NumberTable:
  1098. .db %00111000 ;0
  1099. .db %01000100
  1100. .db %00111000
  1101. .db %00000000
  1102. .db %01001000 ;1
  1103. .db %01111100
  1104. .db %01000000
  1105. .db %00000000
  1106. .db %01100100 ;2
  1107. .db %01010100
  1108. .db %01001000
  1109. .db %00000000
  1110. .db %01000100 ;3
  1111. .db %01010100
  1112. .db %00101000
  1113. .db %00000000
  1114. .db %00011100 ;4
  1115. .db %00010000
  1116. .db %01111100
  1117. .db %00000000
  1118. .db %01011100 ;5
  1119. .db %01010100
  1120. .db %00100100
  1121. .db %00000000
  1122. .db %01111000 ;6
  1123. .db %01010100
  1124. .db %01110100
  1125. .db %00000000
  1126. .db %00000100 ;7
  1127. .db %01110100
  1128. .db %00001100
  1129. .db %00000000
  1130. .db %01101100 ;8
  1131. .db %01010100
  1132. .db %01101100
  1133. .db %00000000
  1134. .db %01011100 ;9
  1135. .db %01010100
  1136. .db %00111100
  1137. .db %00000000
  1138. .db %01111000 ;A
  1139. .db %00010100
  1140. .db %01111000
  1141. .db %00000000
  1142. .db %01111100 ;B
  1143. .db %01010100
  1144. .db %00101000
  1145. .db %00000000
  1146. .db %00111000 ;C
  1147. .db %01000100
  1148. .db %01000100
  1149. .db %00000000
  1150. .db %01111100 ;D
  1151. .db %01000100
  1152. .db %00111000
  1153. .db %00000000
  1154. .db %01111100 ;E
  1155. .db %01010100
  1156. .db %01000100
  1157. .db %00000000
  1158. .db %01111100 ;F
  1159. .db %00010100
  1160. .db %00000100
  1161. .db %00000000
  1162.  
  1163. BinaryNumberTable:
  1164. .db %01000010 ;0
  1165. .db %00000000
  1166. .db %00000000
  1167. .db %00000000
  1168. .db %01000010 ;1
  1169. .db %00000000
  1170. .db %00000000
  1171. .db %00111100
  1172. .db %01000010 ;2
  1173. .db %00000000
  1174. .db %00111100
  1175. .db %00000000
  1176. .db %01000010 ;3
  1177. .db %00000000
  1178. .db %00111100
  1179. .db %00111100
  1180. .db %01000010 ;4
  1181. .db %00111100
  1182. .db %00000000
  1183. .db %00000000
  1184. .db %01000010 ;5
  1185. .db %00111100
  1186. .db %00000000
  1187. .db %00111100
  1188. .db %01000010 ;6
  1189. .db %00111100
  1190. .db %00111100
  1191. .db %00000000
  1192. .db %01000010 ;7
  1193. .db %00111100
  1194. .db %00111100
  1195. .db %00111100
  1196. .db %01111110 ;8
  1197. .db %00000000
  1198. .db %00000000
  1199. .db %00000000
  1200. .db %01111110 ;9
  1201. .db %00000000
  1202. .db %00000000
  1203. .db %00111100
  1204. .db %01111110 ;A
  1205. .db %00000000
  1206. .db %00111100
  1207. .db %00000000
  1208. .db %01111110 ;B
  1209. .db %00000000
  1210. .db %00111100
  1211. .db %00111100
  1212. .db %01111110 ;C
  1213. .db %00111100
  1214. .db %00000000
  1215. .db %00000000
  1216. .db %01111110 ;D
  1217. .db %00111100
  1218. .db %00000000
  1219. .db %00111100
  1220. .db %01111110 ;E
  1221. .db %00111100
  1222. .db %00111100
  1223. .db %00000000
  1224. .db %01111110 ;F
  1225. .db %00111100
  1226. .db %00111100
  1227. .db %00111100
  1228.  
  1229.  
  1230. .echo "LCD code section : ",$-_drawlcd.z80," bytes."
Add Comment
Please, Sign In to add comment