Prev: AFFF Up: Map Next: B04F
B023: Display star frame
Used by the routine at display_stars.
Input
C Mask $00 or $FF
display_star_frame B023 LD A,(star_frame) 0, 2, 4, 6, 8, 10
B026 LD HL,star_frame_lookup Table of pointers
B029 RST $08 Add A to HL
B02A LD E,(HL) Get LSB
B02B INC HL
B02C LD D,(HL) Get MSB
B02D LD HL,(name_table_vdp_address) Get VDP address (always 0)
B030 EX DE,HL Now HL holds address of star frame table to use
display_star_frame_0 B031 LD A,(HL) Get byte from table
B032 OR A
B033 RET Z Zero terminates
B034 JP M,display_star_frame_3 If bit 7 is set it's a change of VDP address
B037 CALL vdp_read_byte vdp_read_byte from DE
B03A CP $18 >= 18
B03C JR NC,display_star_frame_1 Then skip writing
B03E LD A,(HL) Get byte from table
B03F AND C Apply mask
B040 RST $10 Write VDP byte A to DE
display_star_frame_1 B041 INC DE Next VDP address
display_star_frame_2 B042 INC HL Next table address
B043 JP display_star_frame_0 Loop
display_star_frame_3 B046 AND $7F Reset bit 7
B048 ADD A,E Add VDP address LSB
B049 LD E,A Write back to E
B04A JR NC,display_star_frame_2 Loop if no carry
B04C INC D Increment MSB if carry
B04D JR display_star_frame_2 Loop
Prev: AFFF Up: Map Next: B04F