![]() |
Routines |
| Prev: 6EDE | Up: Map | Next: 6F2F |
|
Used by the routines at MenuWriteText, HandlerCup, DisplayBestTime, DisplayPlaceName, PrintStringColour, FlashPlayerMarker, DisplayNightDriver, PlotPixels, PrepareOldSprite and PrepareActorSprite.
Converts pixel co-ordinates into the matching address in the screen buffer.
|
||||||||||||
| ScreenAddress | 6F10 | LD A,L | A=L. | |||||||||
| 6F11 | RRCA | A=A / 08. | ||||||||||
| 6F12 | RRCA | |||||||||||
| 6F13 | RRCA | |||||||||||
| 6F14 | AND %00011111 | Keep only bits 0-4. | ||||||||||
| 6F16 | LD L,A | L=A. | ||||||||||
| 6F17 | LD A,H | A=H. | ||||||||||
| 6F18 | RLCA | A=A * 04. | ||||||||||
| 6F19 | RLCA | |||||||||||
| 6F1A | AND %11100000 | Keep only bits 5-7. | ||||||||||
| 6F1C | OR L | Set the bits from L. | ||||||||||
| 6F1D | LD L,A | L=A. | ||||||||||
| 6F1E | LD A,H | A=H. | ||||||||||
| 6F1F | AND %00000111 | Keep only bits 0-2. | ||||||||||
| 6F21 | EX AF,AF' | Switch to the shadow AF register. | ||||||||||
| 6F22 | LD A,H | A=H. | ||||||||||
| 6F23 | RRCA | A=A / 08. | ||||||||||
| 6F24 | RRCA | |||||||||||
| 6F25 | RRCA | |||||||||||
| 6F26 | AND %00011000 | Keep only bits 3-4. | ||||||||||
| 6F28 | OR %01000000 | Set bit 6. | ||||||||||
| 6F2A | LD H,A | H=A. | ||||||||||
| 6F2B | EX AF,AF' | Switch to the shadow AF register. | ||||||||||
| 6F2C | OR H | Set the bits from H. | ||||||||||
| 6F2D | LD H,A | H=A. | ||||||||||
| 6F2E | RET | Return. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: 6EDE | Up: Map | Next: 6F2F |