![]() |
Routines |
| Prev: 59793 | Up: Map | Next: 59964 |
|
Used by the routine at Blit_DisplayBuffer.
Blit one display-buffer tile to the screen. The graphic-set index selects a base from Table_GraphicSetAddresses; the tile index × 8 is added to that base Attribute bit 7 selects the mirrored blit at Blit_DisplayBufferRowLoop (via BitmapMirrorLookup).
|
||||
|
Write the attribute and resolve the graphic-set tile address.
|
||||
| Blit_DisplayBufferRow | 59887 | SET 6,A | Force bright on the attribute in A and write it through IX. | |
| 59889 | LD (IX+0),A | |||
| 59892 | LD L,B | Keep the tile index in HL (high byte cleared). | ||
| 59893 | XOR A | |||
| 59894 | LD B,A | |||
| 59895 | LD H,A | |||
| 59896 | ADD A,C | Double the graphic-set index into BC as a word offset. | ||
| 59897 | ADD A,C | |||
| 59898 | LD C,A | |||
| 59899 | PUSH HL | |||
| 59900 | LD HL,29451 | Point HL at Table_GraphicSetAddresses, add the set offset, and fetch the set base into BC. | ||
| 59903 | ADD HL,BC | |||
| 59904 | LD C,(HL) | |||
| 59905 | INC HL | |||
| 59906 | LD B,(HL) | |||
| 59907 | POP HL | Restore the tile index, multiply it by 8, and add the set base to get the bitmap address. | ||
| 59908 | ADD HL,HL | |||
| 59909 | ADD HL,HL | |||
| 59910 | ADD HL,HL | |||
| 59911 | ADD HL,BC | |||
| 59912 | EX DE,HL | Keep the bitmap address in DE. | ||
|
Convert the attribute address into a screen-bitmap address and blit.
|
||||
| 59913 | PUSH IX | Copy IX to HL (using the stack). | ||
| 59915 | POP HL | |||
| 59916 | LD A,H | Multiply the attribute high byte by 8. | ||
| 59917 | ADD A,A | |||
| 59918 | ADD A,A | |||
| 59919 | ADD A,A | |||
| 59920 | AND %01011011 | Keep only the screen-bitmap high bits (mask 91). | ||
| 59922 | LD H,A | Write the result to H and move the address into DE. | ||
| 59923 | EX DE,HL | |||
| 59924 | BIT 7,(IX+0) | Is the mirror bit (bit 7) set on the attribute? If so, blit the mirrored tile at Blit_DisplayBufferRowLoop. | ||
| 59928 | JR NZ,Blit_DisplayBufferRowLoop | |||
| 59930 | LD B,8 | There are 8 pixel rows in a tile. | ||
|
Copy 8 pixel rows of an unmirrored tile into the screen bitmap.
|
||||
| Blit_DisplayBufferRow_CopyRows | 59932 | LD A,(HL) | Copy one bitmap row to the screen and step to the next pixel row. | |
| 59933 | LD (DE),A | |||
| 59934 | INC D | |||
| 59935 | INC HL | |||
| 59936 | DJNZ Blit_DisplayBufferRow_CopyRows | |||
| 59938 | RET | Return. | ||
|
Blit the tile with horizontal mirroring via BitmapMirrorLookup.
|
||||
| Blit_DisplayBufferRowLoop | 59939 | RES 7,(IX+0) | Clear the mirror bit on the attribute at IX. | |
| 59943 | LD B,8 | There are 8 pixel rows in a tile. | ||
|
Copy 8 pixel rows with horizontal mirroring via BitmapMirrorLookup.
|
||||
| Blit_DisplayBufferRowLoopB | 59945 | PUSH BC | Fetch a bitmap byte, reverse it through BitmapMirrorLookup, write it to the screen, and step to the next pixel row. | |
| 59946 | LD A,(HL) | |||
| 59947 | PUSH HL | |||
| 59948 | LD HL,29465 | |||
| 59951 | LD C,A | |||
| 59952 | LD B,0 | |||
| 59954 | ADD HL,BC | |||
| 59955 | LD A,(HL) | |||
| 59956 | POP HL | |||
| 59957 | LD (DE),A | |||
| 59958 | INC D | |||
| 59959 | INC HL | |||
| 59960 | POP BC | |||
| 59961 | DJNZ Blit_DisplayBufferRowLoopB | |||
| 59963 | RET | Return. | ||
| Prev: 59793 | Up: Map | Next: 59964 |