Prev: 8021 Up: Map Next: 80E8
8024: Entry point
entry 8024 LD SP,L73BA Init stack pointer
8027 OUT ($C0),A Controller enable
8029 LD HL,center_of_projection Clear RAM
802C LD DE,$7001 center_of_projection+1
802F LD BC,$03B9 ...
8032 LD (HL),L ...
8033 LDIR ...
8035 LD HL,$8060 Set center of projection
8038 LD (center_of_projection),HL ...
803B CALL init_sound Init sound
803E CALL start_screen Start screen
8041 LD HL,$2A30 180 * 60 frames
8044 LD (screensaver_countdown),HL Set screensaver countdown
entry_wait_fire 8047 HALT Wait for interrupt
8048 CALL display_stars Display stars
804B LD HL,$0000 Controller 0, segment 0
804E CALL $1F79 DECODER
8051 BIT 6,H Test fire
8053 JR NZ,new_game Jump if fire pressed
8055 LD HL,$0100 Controller 1, segment 0
8058 CALL $1F79 DECODER
805B BIT 6,H Test fire
805D JR Z,entry_wait_fire Loop until fire pressed
805F LD HL,status_flags Set two-player flag
8062 SET 7,(HL) ...
This entry point is used by the routine at wait_for_restart. Fire pressed
new_game 8064 LD HL,$0000
8067 LD (screensaver_countdown),HL Clear screensaver countdown
806A LD HL,$1800 Name table address
806D LD DE,$0300 Name table size
8070 XOR A Zero
8071 CALL $1F82 FILL_VRAM (clear screen)
8074 LD HL,$201C Last 4 bytes of color table
8077 LD DE,$0004 4 bytes
807A LD A,$F1 Set to white/black
807C CALL $1F82 FILL_VRAM
807F LD HL,current_player Clear RAM from $71F1
8082 LD DE,frame_counter To $7256
8085 XOR A ...
8086 LD (HL),A ...
8087 LD BC,$0065 ...
808A LDIR ...
808C LD A,(status_flags) Clear all flags but two-player flag
808F AND $80 ...
8091 LD (status_flags),A ...
8094 LD A,$05 5 Lives
8096 LD (lives),A Set lives
8099 INC A Increment to 6
809A LD (score_extra_life_1_MSB),A Set score_extra_life_1+2 to 6 (extra life at 60000)
809D LD (score_extra_life_2_MSB),A Set score_extra_life_2+2 to 6 (extra life at 60000)
80A0 LD A,$01 Stage
80A2 LD (stage),A Set to 1
80A5 CALL init_center_enemies Init center enemies
80A8 LD HL,stage_msg Display stage message
80AB LD DE,$1AF8 ...
80AE LD BC,$0005 ...
80B1 RST $38 WRITE_VRAM
80B2 LD DE,$1802 Display '1' at the top left corner
80B5 LD A,$31 ...
80B7 RST $10 Write VDP byte
80B8 INC DE Display '-' next to '1'
80B9 LD A,$2D ...
80BB RST $10 Write VDP byte
80BC XOR A Parameter to display score
80BD CALL display_score Display score player 1
80C0 LD A,(status_flags) Flags
80C3 BIT 7,A Test bit for two players
80C5 JR Z,entry_0 If bit is reset then skip ahead
80C7 LD DE,$181E Display '-' at the top right corner
80CA LD A,$2D ...
80CC RST $10 Write VDP byte
80CD INC DE Display '2' next to '-'
80CE LD A,$32 ...
80D0 RST $10 Write VDP byte
80D1 LD A,$01
80D3 CALL display_score Display score player 2
80D6 LD HL,lives Save player data in VDP RAM, starting with lives
80D9 LD DE,$1300 VDP address
80DC LD BC,$002D 45 bytes
80DF RST $38 WRITE_VRAM
entry_0 80E0 LD A,R Random number seed
80E2 LD ($731C),A Init random number
80E5 CALL init_stage Initialize stage
Prev: 8021 Up: Map Next: 80E8